View Code of Problem 111

#includ<stdio.h>
int main()
{
  int a,b;
  scanf("%d%d",&a,&b);
  if(a!=0||b!=0)
  {
    printf("%d\n",a+b);
  }
  break;
  return 0;
}
/*
Main.c:1:2: error: invalid preprocessing directive #includ
 #includ<stdio.h>
  ^
Main.c: In function 'main':
Main.c:5:3: warning: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
   scanf("%d%d",&a,&b);
   ^
Main.c:5:3: warning: incompatible implicit declaration of built-in function 'scanf'
Main.c:8:5: warning: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
     printf("%d\n",a+b);
     ^
Main.c:8:5: warning: incompatible implicit declaration of built-in function 'printf'
Main.c:10:3: error: break statement not within loop or switch
   break;
   ^
*/

Double click to view unformatted code.


Back to problem 111