Document
Document
int main() {
cout << "Please enter your score for Exam 1 (out of 100): ";
cout << "Please enter your score for Exam 2 (out of 100): ";
cout << "Please enter your score for Exam 3 (out of 100): ";
cout << "Please enter the bonus points earned (out of 5): ";
if (exam1 < 0 || exam1 > 100 || exam2 < 0 || exam2 > 100 || exam3 < 0 || exam3 > 100) {
cout << "Invalid exam score. Please enter scores between 0 and 100." << endl;
return 1;
cout << "Invalid bonus points. Please enter a value between 0 and 5." << endl;
return 1;
cout << "Your total score is: " << totalScore << endl;
cout << "Based on your performance, your final grade is: ";
return 0;