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.
#include <iostream>
using namespace std;
int main(){
double test1;
double test2;
double test3;
double test4;
double test5;
double average = ( test1 + test2 + test3 + test4 + test5) / 5;
}
return 0;
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