#include <iostream>
#include <iomanip>
using namespace std;
int main()
{
string name;
char indicator = 'c' ; // Input indicator
char answer1,answer2,answer3,answer4,answer5;
int count1,count2,count3,count4,count5;
cout << " Welcome to Risk master, answer those 5 questions to calculate how risky your partner is";
cout << " Rule : press Y for Yes, N for No, No space for the name " ;
cout << " Enter name : " << endl;
cin >> name ;
while ( indicator == 'c' || indicator == 'C' )
{
cout << endl
<< " Income > 100k/year : " ;
cin >> answer1;
if (answer1 == 'y')
{
count1 =2 ;
else
count1 = 0 ;
}
cout << "Just have me to support : " ;
cin >> answer2;
if (answer2 == y)
{
count2 = 2;
else
count2 =0 ;
}
cout << "When we divorce, I am gonna get all the property? : " ;
cin >> answer3;
if (answer3 == y)
{
count3 = 2;
else
count3 =0 ;
}
cout << "When we hangout, You gonna pay for dating and dinner : " ;
cin>> answer4;
if (answer4 == y)
{
count4 = 2;
else
count4 =0;
}
cout << " Say yes for everything above: "
cin>> answer5;
if (answer5 == y)
{
count5 = 2;
else
count5 =0
}
total = count1+ count2+ count3+ count4+ count5;
result = (total/10)*100;
cout << " The rate for : " <<name << "is" << result << endl;
cout << " Want to play another game : y/n"
cin >> indicator;
}
system ("pause");
return 0;
just try to make fun after watching the movie about the man who tries to calculate risk with software....
but don't know why its stuck... Any help?