View Code of Problem 110

#inlcude <iostream>
using namespace std;

int main(){
  int a,b;
  while(scanf("%d%d",&a,&b)!=EOF){
    printf("%d\n",a+b);
  }
}
/*
Main.cc:1:2: error: invalid preprocessing directive #inlcude
 #inlcude <iostream>
  ^
Main.cc: In function 'int main()':
Main.cc:6:27: error: 'scanf' was not declared in this scope
   while(scanf("%d%d",&a,&b)!=EOF){
                           ^
Main.cc:6:30: error: 'EOF' was not declared in this scope
   while(scanf("%d%d",&a,&b)!=EOF){
                              ^
Main.cc:7:22: error: 'printf' was not declared in this scope
     printf("%d\n",a+b);
                      ^
*/

Double click to view unformatted code.


Back to problem 110