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 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112
|
#include <iostream>
#include <algorithm>
#include <vector>
#include <string>
using namespace std;
int main()
{
string letsgo,Q1 = "A",Q2 = "A",Q3 = "A",Q4 = "A",Q5 = "A";
int mediccount,magecount,warriorcount,gunnercount,int_array;
cout << "Input the letter that corresponds to your selected answer then hit enter. The best way to get an accurate answer is to answer these questions truthfully, even though an obvious pattern may emerge. Continue? (y/n)";
cin >> letsgo;
if (letsgo=("y"||"Y"))
{
question1:
cout << "1. At the beach, you see a large island in the middle of the water. What do you do?\n" << "A) I wonder if there are any survivors that need helping.\n" << "B) Let's blow it up. WITH FIRE.\n" << "C) I claim this land in the name of the king. Me.\n" << "D) Use the coconuts on the trees as target practice.\n";
cin >> Q1;
if (Q1=!("A"||"a"||"B"||"b"||"C"||"c"||"D"||"d"))
{
cout << "Please enter a valid character.\n";
goto question1;
}
question2:
cout << "2. You find yourself in a forest.\n" << "A) I know the closest exit, water source, and predator, down to the closest centimeter.\n" << "B) Let's burn it down. WITH FIRE.\n" << "C) I smell the nearest predator and my pheromones tell him he's going to be my next meal." << "D) Spot the mouse in the next three fields over.\n";
cin >> Q2;
if (Q1=!("A"||"a"||"B"||"b"||"C"||"c"||"D"||"d"))
{
cout << "Please enter a valid character.\n";
goto question2;
}
question3:
cout << "3. When someone yells "MEDIC!", you are:\n" << "A) That medic.\n" << "B) Who needs medics?\n" << "C) The guy who caused someone to call for the medic.\n" << "D) Trying to snipe the medic at this moment.\n";
cin >> Q3;
if (Q1=!("A"||"a"||"B"||"b"||"C"||"c"||"D"||"d"))
{
cout << "Please enter a valid character.\n";
goto question3;
}
question4:
cout << "4. You're making sausages.\n" << "A) What the hell am I doing here?\n" << "B) Burn, baby, burn.\n" << "C) Twist, pull, twist, pull, twist, pull…\n" << "D) Let's make them as large as possible so they'll fit properly in my potato cannon.\n";
cin >> Q4;
if (Q1=!("A"||"a"||"B"||"b"||"C"||"c"||"D"||"d"))
{
cout << "Please enter a valid character.\n";
goto question4;
}
question5:
cout << "5. A wizard has taken over your town.\n" << "A) Assist the revolutionaries.\n" << "B) I am that wizard." << "C) Lead the revolutionaries.\n" << "D) Oh, you mean that wizard I shot yesterday?";
cin >> Q5;
if (Q1=!("A"||"a"||"B"||"b"||"C"||"c"||"D"||"d"))
{
cout << "Please enter a valid character.\n";
goto question5;
}
int_array[] = {Q1,Q2,Q3,Q4,Q5,}
mediccount = (int) count (int_array, int_array+5, ("a"||"A"));
magecount = (int) count (int_array, int_array+5, ("b"||"B"));
warriorcount = (int) count (int_array, int_array+5, ("c"||"C"));
gunnercount = (int) count (int_array, int_array+5, ("d"||"D"));
if (mediccount > (magecount||warriorcount||gunnercount))
{
cout << "You are most like the medic.";
}
else if (magecount > (mediccount||warriorcount||gunnercount))
{
cout << "You are most like the mage.";
}
else if (warriorcount > (mediccount||magecount||gunnercount))
{
cout << "You are most like the warrior.";
}
else if (gunnercount > (mediccount||magecount||warriorcount))
{
cout << "You are most like the gunner.";
}
else if (mediccount == magecount)
{
cout << "You have traits of both the medic and the mage.";
}
else if (mediccount == warriorcount)
{
cout << "You have traits of both the medic and the warrior.";
}
else if (mediccount == gunnercount)
{
cout << "You have traits of both the medic and the gunner.";
}
else if (magecount == warriorcount)
{
cout << "You have traits of both the mage and the warrior.";
}
else if (magecount == gunnercount)
{
cout << "You have traits of both the mage and the gunner.";
}
else if (warriorcount == gunnercount)
{
cout << "You have traits of both the warrior and the gunner.";
}
return 0;
}
|