Hey guys, I really do not know on how to start this loop logic structure. Can anyone give me a rough idea on how to go about it?
The question is :

Develop a solution to calculate a student's grade average for one semester. The letter grades should be entered and the grade average printed out. An A is equivalent to 4 grade points, a B is 3 grade points; a C is 2 grade points, a D is 1 grade point, and an F is zero grade points.

Anyone pls ? :sad:

Recommended Answers

All 2 Replies

loop, controlled by successful input
convert letter to its numeric equivalent
add that to running total
keep count of number of grades
when loop done, figure the average from the total and count

Set grade total to 0
Start a loop.
For each input, add the appropriate value to grade total
Count each input.

You can figure out how/when to end the loop and calculate the rest of the grade

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.