View Code of Problem 111

#include <stdio.h>
int main()
{
	while (scanf("%d%d",%a,&b)!=EOF&&a!=0&&b!=0)
        
        {
        	
        	printf("%d\n",a+b);
        
        }


}
/*
Main.c: In function 'main':
Main.c:4:22: error: expected expression before '%' token
  while (scanf("%d%d",%a,&b)!=EOF&&a!=0&&b!=0)
                      ^
Main.c:4:35: error: 'a' undeclared (first use in this function)
  while (scanf("%d%d",%a,&b)!=EOF&&a!=0&&b!=0)
                                   ^
Main.c:4:35: note: each undeclared identifier is reported only once for each function it appears in
Main.c:4:41: error: 'b' undeclared (first use in this function)
  while (scanf("%d%d",%a,&b)!=EOF&&a!=0&&b!=0)
                                         ^
*/

Double click to view unformatted code.


Back to problem 111