View Code of Problem 1

void main(){
cin>>a;
cin>>b;
  cout>>(a+b);
}
/*
Main.cc:1:11: error: '::main' must return 'int'
 void main(){
           ^
Main.cc: In function 'int main()':
Main.cc:2:1: error: 'cin' was not declared in this scope
 cin>>a;
 ^
Main.cc:2:6: error: 'a' was not declared in this scope
 cin>>a;
      ^
Main.cc:3:6: error: 'b' was not declared in this scope
 cin>>b;
      ^
Main.cc:4:3: error: 'cout' was not declared in this scope
   cout>>(a+b);
   ^
*/

Double click to view unformatted code.


Back to problem 1