Project
Report card maker
Read marks, work out the total, average and grade, and print a neat report card.
- Read three marks (whole numbers), one per line, into
m1,m2andm3, then printTotal:followed by their sum. - Keep your code, and add a second line of output:
Average:followed by the average rounded to 2 decimal places (useround(avg, 2)). - Add a third line:
Grade:followed by A if the average is 80 or more, B if 60 or more, C if 40 or more, otherwise F. - Finally, read the student's name first (before the marks) and print it as the first line:
Report card for NAME. Everything else stays the same.
Line 1, column 1Tab indents 4 spaces. Press Esc then Tab to leave the editor.