Dr. A.P.J. Abdul Kalam Technical University (AKTU), Lucknow

Lab Exercise

10. Write a program that accepts marks of five subjects and finds percentage and prints grades according to the following criteria:

Between
90-100% —————————– Print ‘A’
80-90% —————————— Print ‘B’
60-80% —————————— Print ‘C’
Below 60% ————————- Print ‘D’.

Sample Input and Output

Stdin Inputs:

84 95 79 83 89

Sample Result:

Input first subject marks: 84
Input second subject marks: 95
Input third subject marks: 79
Input forth subject marks: 83
Input fifth subject marks: 89
Total marks: 430
Percentage: 86.00 %
Grade: B

Leave a Reply

Your email address will not be published.

Scroll to Top