I'm having trouble, I don't know how to exit main and end the program if the user is exempt the first time. Also I have to make the program determine the best grade they can obtain after taking the final(worth 100 points) if they are not exempt after the first two times being asked.
Grading Ranges are
A = 450 – 500
B = 400 – 449
C = 350 – 399
D = 300 – 349
F = 0 – 299
#include <iostream>
#include <cmath>
#include<iomanip>
using namespace std;
Will I still be able to use the " if(score == 450 || score > 450) " statement in the "else if " part? if so how? and I'm just going about it the way I understand the most right now. It's more simpler to me
// Snip...
if(score >= 450)
cout << "You are exempt from the Final Exam" << endl;
else {
cout<< "You are not exempt" << endl;
cout<< "Enter your projected grade for Homework 7: " << endl;
cin >> Sean.hw7;
score += Sean.hw7;
if(score >= 450)
cout << "You are exempt from the Final Exam" << endl;
else
cout<< "You are still not exempt" << endl;
}
std::cout << "Press ENTER to continue...";
std::cin.ignore( std::numeric_limits<std::streamsize>::max(), '\n' );
return 0;
}
Can you post the output of your program? I'm not sure we're on the same page as to what continuing through your program means. Logically, after you display your score, if it's over 450, it'll say you're exempt, display "Press ENTER to continue..." and wait for you to press a button. Otherwise, it will move on. Just make sure you're putting it in the correct place.
Your total score is 470.
You are exempt from the Final Exam
Enter your projected grade for Homework 7: 30
You are exempt from the final exam
Press ENTER to continue...press any key to continue