+ 1
Hi. What is wrong with this code
I am trying to sum the inputs from the users 5 times , here is the code #include <iostream> using namespace std; int main() { int num = 1; int total = 0; int number; while (num <= 5){ cin >> number; number += num; num++; cout << number } return 0; }
2 Answers
0
You forgot to puts semicolon (;) on "cout << number", It's must be "cout << number;".



