if (percentage > 89 && percentage < 101)
cout << " You got an A! ";
if (percentage > 79 && percentage < 90)
cout << " You got a B! ";
if (percentage > 69 && percentage < 80)
cout << " You got a C! ";
if (percentage < 70)
cout << " You got an F! ";
system("PAUSE");
// Output
cout << " Did you get any extra credit? ";
cin >> response;
if ( response = yes )
cout << " alright, how many points: ";
cin >> extra;
cout << " You got a " << pwec << "% ";
if (pwec < 101 && pwec > 89)
cout << " With extra credit you have an A! ";
if (pwec < 90 && pwec > 79)
cout << " With extra credit you have a B! ";
if (pwec < 80 && pwec > 69)
cout << " With extra credit you have a C! ";
if (pwec < 70)
cout << " You still have an F with extra credit ";
if (response = no)
cout << " Thank you for using this program! ";
system("PAUSE");
return EXIT_SUCCESS;
}
What is happening is hard to describe. After asking if extra credit was received , it doesn't let the user give any input and instead jumps right over the
cin >> extra;
(extra is the variable for extra credit). and goes strait to the the output, and treats extra as if it were 0, because it still gives an output percentage