Beginner and trying to learn.

closed account (LE8p216C)
I need help calculating the final grades. Assume we have only 3 students in this class so build a loop into this program. Obtain the student id #, the first test grade, second test score and 4 lab assignment scores from the keyboard. Validate that the 2 test scores are between 0-100. In the main routine, calculate the average by adding the six scores together and then dividing the result by six. Call a function, taking with you the average, that will figure and print the letter grade. Based on the Average, assign the student a letter grade as follows: Average Range Letter Grade 90 - 100 A 80 – 89.9 B 70 – 79.9 C 60 – 69.9 D 0 - 59.9 F

This is for a class I am teaching showing them a basic on CPP can anyone show me the most basic command way of doing this without any hard arrays or loops that would be confusing for them starting out?
Last edited on
You should have 7 variables to store the required information. You can then use std::cin to input into all of them (without loops). Next, you can use them to print out a letter grade based on the specifications you assigned, using if blocks.
Topic archived. No new replies allowed.