Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I need to: Write a program to read a list of exam grades given asint's in the range of0to100. Your program will display the total

I need to:

Write a program to read a list of exam grades given asint's in the range of0to100. Your program will display the total number of grades and the number of grades in each letter-grade category as follows:

A

93 <= grade <= 100

A-

90 <= grade < 93

B+

87 <= grade < 90

B

83 <= grade < 87

B-

80 <= grade < 83

C+

77 <= grade < 80

C

73 <= grade < 77

C-

70 <= grade < 73

D

60 <= grade < 70

F

0 <= grade < 60

Use a negative number as a sentinel value to indicate the end of the input. (The negative value is used only to end the loop, do not use it in your calculations.)

Each time you prompt the user to enter a grade you will print:

 Enter a grade: 

For example, if the input is:

 98 95 87 86 83 92 85 78 74 72 81 71 69 63 50 43 -1 

The output would be:

 Total number of grades = 16 Number of A's = 2 Number of A-'s = 1 Number of B+'s = 1 Number of B's = 3 Number of B-'s = 1 Number of C+'s = 1 Number of C's = 1 Number of C-'s = 2 Number of D's = 2 Number of F's = 2 

Please note that your class should be namedGrades.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Financial management theory and practice

Authors: Eugene F. Brigham and Michael C. Ehrhardt

12th Edition

978-0030243998, 30243998, 324422695, 978-0324422696

Students also viewed these Programming questions