Compiler output
prog.cpp: In function 'int main()':
prog.cpp:17:7: error: expected '(' before 'i'
for i in range
^
prog.cpp:17:7: error: 'i' was not declared in this scope
prog.cpp:18:5: error: expected primary-expression before '}' token
}
^
prog.cpp:18:5: error: expected ';' before '}' token
prog.cpp:18:5: error: expected primary-expression before '}' token
prog.cpp:18:5: error: expected ')' before '}' token
prog.cpp:18:5: error: expected primary-expression before '}' token
prog.cpp:20:25: error: 'x' was not declared in this scope
cout << "answer " << x << "\n";
^
prog.cpp:24:1: error: expected '}' at end of input
}
^