View Code of Problem 1

#include <stdio.h>

int main()
{
  scanf(%d %d, &a, &b);
  printf("%d\n",a+b);
}
/*
Main.c: In function 'main':
Main.c:5:9: error: expected expression before '%' token
   scanf(%d %d, &a, &b);
         ^
Main.c:6:17: error: 'a' undeclared (first use in this function)
   printf("%d\n",a+b);
                 ^
Main.c:6:17: note: each undeclared identifier is reported only once for each function it appears in
Main.c:6:19: error: 'b' undeclared (first use in this function)
   printf("%d\n",a+b);
                   ^
*/

Double click to view unformatted code.


Back to problem 1