+ 1
What is wrong with this code ?
#include<iostream> using namespace std; main() { long var=10; long x=0; while(x<=10) { var=var-x; //var-=x; ++x; cout<<var; } }
1 Answer
+ 2
Missing int type declaration on main().
Missing return statement at end of main().
(Optional) Missing newline or std::endl or other textual separator, like space or comma, at end of cout stream.