BCS-1A

Wednesday, December 28, 2011

Love Percentage


/****************************************************************
  Name: Love Percentage
 
  Copyright: BCS-1A
 
  Author: Muhammad Hussnain Imtiaz
 
  Date: 22/12/11 00:50
 
  Description: just For Fun and Entertainment
*****************************************************************/
 # include <iostream>
 # include <conio.h>
 # include <string>

 using namespace std ;

 int main ()
{
//   Local declaration
   string name1,
          name2;
   double num1 = 0.0 ,
          ans  = 0.0 ;
   int i=0 ;
   cout << "             ......Love Percentage......   " << endl ;
   cout << "              Enter your Name: "    ;
   getline (cin,name1) ;
   cout << "              Enter Your Lover Name: " ;
   getline (cin,name2) ;
   cout << "\n              Enter  your  Lucky  number  \n"
        << "          (Please only use less than 100) : " ;
   cin  >> num1 ;
   cout << endl ;
   if ( num1<=30 )
   {
   ans = num1 * 2.0 ;
   cout << "       *******************************************\n";
   cout << "                    " << name1 << " and " << name2 << endl;  // Space strings are just use for beauty in executed program
   cout << "            Your love Percentage is : " << ans << " % " ;
   cout << "\n       *******************************************";
   }
 
   else if ( num1>30 && num1<=40 )
   {
   ans = num1 * 1.2 ;
   cout << "       *******************************************\n";
   cout << "                    " << name1 << " and " << name2 << endl;
   cout << "            Your Love Percentage is : " << ans << " % " ;
   cout << "\n       *******************************************";
   }
 
   else if ( num1>40 && num1<=50 )
   {
   ans = num1 + 30.0986551 ;
   cout << "       *******************************************\n";
   cout << "                    " << name1 << " and " << name2 << endl;
   cout << "            Your Love Percentage is : " << ans << " % " ;
   cout << "\n       *******************************************";
   }
 
   else if ( num1>50 && num1<=60 )
   {
   ans = num1 * 0.99999 ;
   cout << "       *******************************************\n";
   cout << "                    " << name1 << " and " << name2 << endl;
   cout << "            Your Love Percentage is : " << ans << " % " ;    
   cout << "\n       *******************************************";
   }
 
   else if ( num1>60 && num1<=70 )
   {
   ans = num1 / 1.593443 ;
   cout << "       *******************************************\n";
   cout << "                    " << name1 << " and " << name2 << endl;
   cout << "            Your Love Percentage is : " << ans << " % " ;    
   cout << "\n       *******************************************";
   }
 
   else if ( num1>70 && num1<=80 )
   {
   ans = num1 + 13.0 ;
   cout << "       *******************************************\n";
   cout << "                   " << name1 << " and " << name2 << endl ;
   cout << "            Your Love Percentage is : " << ans << " % " ;
   cout << "\n       *******************************************";
   }
 
   else if ( num1>80 && num1<=90 )
   {
   ans = (num1 / 5.11)*2 ;
   cout << "       *******************************************\n";
   cout << "                    " << name1 << " and " << name2 << endl;
   cout << "            Your Love Percentage is : " << ans << " % " ;    
   cout << "\n       *******************************************";
   }
 
   else if ( num1>90 && num1<=95 )
   {
   ans = num1 / 1.3 ;
   cout << "       *******************************************\n";
   cout << "                    " << name1 << " and " << name2 << endl;
   cout << "            Your Love Percentage is : " << ans << " % " ;
   cout << "\n       *******************************************";
   }
 
   else if ( num1>95 && num1<100 )
   {
   ans = (num1 / 0.999999) ;
   cout << "       *******************************************\n";
   cout << "                    " << name1 << " and " << name2 << endl;
   cout << "            Your Love Percentage is : " << ans << " %\n";
   cout << endl ;
   cout << "                        Shoot him                   "   ;
   cout << "\n       *******************************************";
   }
 
   else if ( num1>99 && num1<101 )
   {
   ans = num1 * 0.0 ;
   cout << "       *******************************************\n";
   cout << "                    " << name1 << " and " << name2 << endl;
   cout << "            Your Love Percentage is : " << ans << " %\n";
   cout << endl ;
   cout << "                  Charachter Dheela                   " ;
   cout << "\n       *******************************************";
   }
 
   else if ( num1>100 )
   {
   cout << "\n           Your lucky number is invalid          " ;  
   }
   if ( ans>=90 )
   {
   cout << "\n\n\n                         WooooooW            " ;  
   }
 
  cout << "\n\n\n\n\n\n\n\n\n             Created By:Mohammad Hussnain Imtiaz" ;  
   getch ( ) ;
   return 0 ;
}

No comments:

Post a Comment