View Code of Problem 1

#include<stdio.h>
void main(){
	int a,b;
  while(scanf("%d %d",&a,&b)!=EOF){
  	prinf("%d",a+b);
  }
}
/*
Main.c:2:6: warning: return type of 'main' is not 'int' [-Wmain]
 void main(){
      ^
Main.c: In function 'main':
Main.c:5:4: warning: implicit declaration of function 'prinf' [-Wimplicit-function-declaration]
    prinf("%d",a+b);
    ^
/tmp/ccOvxkcH.o: In function `main':
Main.c:(.text+0x1f): undefined reference to `prinf'
collect2: error: ld returned 1 exit status
*/

Double click to view unformatted code.


Back to problem 1