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
|
int main(){
string a, b, c, d, e, f, g;
cout << "Let's start with a few questions about yourself.(Press ENTER)";
cin.ignore();
cout << "What is your name?(Only FIRST NAME)\n";
getline (cin, a);
cout << "Okay, " << a << ", let's begin.\n";
cout << "What is your favorite type of cake?\n";
getline (cin, b);
cout << "Interesting... Are you an outgoing person? (Yes or No)\n";
getline (cin, c);
do {cout << "Please answer Yes or No.\n";
getline (cin, c);}
while (c != "yes"&&c != "Yes"&&c != "no"&&c != "No");
if (c == "Yes"||c == "yes") {
cout << "Oh really! Do you like to hang out with friends, or play sports? (answer Friends or Sports)\n";
getline (cin, d);
}
else if (c == "No"||c == "no") {
cout << "Do you like to watch TV or Play video games? (answer TV or games)\n";
getline (cin, d);
}
if (d == "Friends"||d == "friends") {
cout << "Thank you for taking this survey! You are " << a << ",an outgoing person who likes to hang out with friends and eat " << b << " cake!\n";
}
else if (d == "Games"||d == "games") {
cout << "Do you like Halo Reach, or Call of Duty: Black Ops? (Answer Halo or Cod)\n";
getline (cin, e);
}
else if (d == "Sports"||d == "sports") {
cout << "How fascinating! What is your favorite sport?\n";
getline (cin, f);
cout << "Thank you for taking this survey! You are " << a << ",an outgoing person who likes to play " << f << " and eat " << b << " cake!\n";
}
else if (d == "TV"||d == "Tv"||d == "tV"||d == "tv") {
cout << "What is your favorite TV show?\n";
getline (cin, g);
cout << "Thank you for taking this survey! You are " << a << ",a stay at home person who likes to watch " << g << " and eat " << b << " cake!\n";
}
if (e == "Halo"||e == "halo") {
cout << "Isn't it just amazing! Anyway, thank you for participatng in this completely\nvoluntary survey. You are " << a << ", a stay at home person who likes\nto play Halo Reach and eat " << b << " cake!\n";
}
else if (e == "Cod"||e == "cOd"||e == "coD"||e == "COd"||e == "cOD"||e == "CoD"||e == "COD") {
cout << "How disappointing...you are " << a << ", a stay at home person who eats " << b << " cake and wastes his life playing a stupid game that Treyarch created from their ass-holes.....like always\n";
}
cin.get();
ofstream results;
results.open ("results.txt", ios::app);
results <<"Name:"<< a <<"\n"<<"Cake:"<< b <<"\n"<<"Outgoing:"<< c <<"\n"<< d <<"\n"<< e <<"\n"<< f <<"\n"<< g <<"\n";
results.close();
return 0;
}
|