I'm making a program that is supposed to find the average max. and min. temperature, and average rainfall within a month, but also the total rainfall. I've made a for-loop which I'm pretty proud of, only i have no idea if i can get hold of all the inputs the user gives in this loop.
How can i store or get hold of all the inputs so that i can use them to find the average and total?
Also, feel free to give feedback on the existing code I've written.
PS: Output is written in Norwegian, they're just asking for the appropriate input
You could create three new variables to keep running totals for the inputs. Every time you input minTemp in the 'for' loop you would add it to minTempTotal. Then after the 'for' loop you can use minTempTotal to calculate the average. The same would apply for the other two inputs.