So i am making a program where the user enters a number of students from 1-20, and then it calculates the average grade of all those students. IT then prints every original score and the average
The only way to print values is by having them. In other words, you have to store the values when you receive them.
You have probably already heard of arrays. While there are more dynamic solutions, a static array suites your problem. You know that you need to store (at most) 20 scores. Therefore, make an array for 20 scores.
Btw, why is clas a double? Would it not be rather morbid to have 3.14 students?
@keskiverto i just like to classify all my number variables as a double or float, i don't really like to use int unless i have no decimal points in my program hahaha
and also no we haven't had an assignment on arrays but i will look it up since i am teaching myself basically. Thank you!