I am writing code to average 5 test scores inputted by the user. I have been unable to even run the code since I have build errors.
using namespace std;
double average = ( test1 + test2 + test3 + test4 + test5) / 5;
Of course you have errors.
Let me be you, and you be the computer. I'm telling you the following sentence:
"Please, sum me two numbers and tell me the result".
Wouldn't your reaction be something like "yeah how can i tell you the result if you don't tell me which numbers to sum?"?
Also, did you spend at least 1 second trying to even read the error?
(plus the return must be inside the main method)
Last edited on