View Code of Problem 1

#include <stdio.h>
int main(){
	 int a,b,c;
	 scanf("%d %d",&a,&b);
  c=a+b;
  printf("%d",c);
	 return 0;
}

/*
Main.c: In function 'main':
Main.c:3:3: error: stray '\357' in program
   int a,b,c;
   ^
Main.c:3:3: error: stray '\274' in program
Main.c:3:3: error: stray '\214' in program
Main.c:3:13: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'c'
   int a,b,c;
             ^
Main.c:4:21: error: 'b' undeclared (first use in this function)
   scanf("%d %d",&a,&b);
                     ^
Main.c:4:21: note: each undeclared identifier is reported only once for each function it appears in
Main.c:5:3: error: 'c' undeclared (first use in this function)
   c=a+b;
   ^
*/

Double click to view unformatted code.


Back to problem 1