1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94
|
#include <iostream>
#include <cmath>
#include <iomanip>
#include <cstdlib>
#include <string>
using namespace std;
int main()
{
int a=1, b=2, c=3;
double num1, num2, num3, num4, num5, FriendScore;
char foodQ='Y', sportsQ='Y', moviesQ='Y', beverageQ='Y';
cout << "Phil's Friendship Algorithm ! " << endl;
cout << "Call potential friend" << endl;
cout << "Brrrrring....." << endl;
cout << "Brrrrring....." << endl;
cout << "Brrr...... Hello ?" << endl;
cout<< "Hey ! Do you want to get some food?: " << endl;
if (foodQ == 'Y')
{
cout << "Yay! What do you prefer ?" << "(a-Seafood, b-steak, or c-vegetarian)";
cin >> num1;
cout << "Cool let's grub out . I'll pick you up.";
cout << " Awesome see you in a bit.. friend ;) ! " << endl;
}
else if (foodQ == 'y')
{
while (foodQ == 'y')
{
cout << "Ok no problem. Do you like sports?: ";
if (sportsQ == 'Y')
{
cout << "Heck Ya ! Me too ! What do you want to play ?" << "(a-Basketball, b-Baseball, c-Football) ";
cin >> num2;
}
else if (sportsQ == 'y')
{
while (sportsQ == 'y')
{
cout << "Alright. I'm tired anyways. How about a movie ?! ";
}
if (moviesQ == 'Y')
{
cout << "Awesome ! What type of movie do you want to see ?" << "(a-Action, b-Suspense, c-Romance) ";
cin >> num3;
cout << "Cool ! See you in a bit ! I'll bring the popcorn ! " << endl;
}
else if (moviesQ == 'y')
{
while (moviesQ == 'y')
{ cout << "Ya movie tickets are pretty expensive. How about we get something to drink ? Nothing expensive or tiring. What do you say ? ";
}
if (beverageQ == 'Y')
{
cout << " Cool lets do it. What kind of beverage do you want to get ? (a-Coffee, b-Beer, c-Tea) ";
cin >> num4;
cout << "Cool, I'll come by and pick you up. See ya in a bit ! ";
cout << " O Wait !! Before I go, I wanted to tell you not to bring any money. I'll pay since we're new friends. Is that ok ?" << "(a-Yes, b-Maybe, c-No) ";
cin >> num5;
}
else if (beverageQ == 'y')
{
cout << "Darn. Alright well I guess I'll talk to you later. " << endl;
}
}
}
}
}
FriendScore = num1 + num2 + num3 + num4 + num5;
cout << "You scored a" << FriendScore << "out of 50 ! This score represents how good of friends you will be !" << endl;
return 0;
}
void Food(int &x, int &y, int &z)
void Sports(int &x, int &y, int &z)
void Movies(int &x, int &y, int &z)
void Beverage(int &x, int &y, int &z)
void Money(int &x,int &y, int &z)
{
x = 10;
y = 5;
z = 1;
}
|