View the step-by-step solution to:


10453510help me with these exercises please


4. Write a program that prints the corresponding letter grade (A, B, C, D, or
F) for a numeric grade (between 0 and 100) entered by the user using the
grading policy: 90 or above: A; 80-89: B; 70-79: C; 60-69: D; below
60: F. Your program should have a prompt that reminds the user of entering
a numeric grade (0..100) and then prints out the corresponding letter grade
with appropriate message. For example:
Enter a numeric grade:
Good job!
Your letter grade is B.
//If you run your program again
Enter a numeric grade:
Need to work harder and repeat the class next semester!
Your letter grade is F.
5. Find Highest Score: Complete the program below so that it reads and prints
three test scores, then prints the largest of the three. Run your program three
times using the three sets of input values listed below:
Three sets of input values you will use to test your program are:
#1: 100 80 70
#2: 70 80 100
#3: 80 100 60
The sample output from your program:
Enter three different scores:
80 100 60
The highest score is 100
// The program reads and prints three test scores.
// The largest value of the three is printed with an
// appropriate message.
// Assumption:
The scores are unique.
#include <iostream>
using namespace std;
int main ( )
int testlScore;
int test2Score;
cout << "Enter score for test 1; press return." << endl;
cin >> testiScore;
cout << "Enter score for test 2; press return. " << endl;
cin >> test2Score;
cout << "Enter score for test 3; press return." < endl;
cin >> test3Score;
cout << "The three test scores are: " << endl;
cout << testlScore << endl;
cout << test2Score << endl;
cout << test3Score << endl;
//Find out the highest score and print it out.
/ /More . . .
return 0;

Top Answer

View the full answer

Sign up to view the full answer

Why Join Course Hero?

Course Hero has all the homework and study help you need to succeed! We’ve got course-specific notes, study guides, and practice tests along with expert tutors.


Educational Resources
  • -

    Study Documents

    Find the best study resources around, tagged to your specific courses. Share your own to gain free Course Hero access.

    Browse Documents
  • -

    Question & Answers

    Get one-on-one homework help from our expert tutors—available online 24/7. Ask your own questions or browse existing Q&A threads. Satisfaction guaranteed!

    Ask a Question