View Code of Problem 113

int main()
{
	int a,b;
	while(scanf("%d %d",&a,&b)!=EOF)
	{
		printf("%d\n",a+b);
		printf("\n");
	}
	return 0;
}
/*
Main.cc: In function 'int main()':
Main.cc:5:27: error: 'scanf' was not declared in this scope
  while(scanf("%d %d",&a,&b)!=EOF)
                           ^
Main.cc:5:30: error: 'EOF' was not declared in this scope
  while(scanf("%d %d",&a,&b)!=EOF)
                              ^
Main.cc:7:20: error: 'printf' was not declared in this scope
   printf("%d\n",a+b);
                    ^
*/

Double click to view unformatted code.


Back to problem 113