View Code of Problem 1

#include<stdio.h>
int main()
{
  int A,B,sum;
  scanf("%d,%d",&a,&b);
  printf("sum=A+B\n",sum);
  return 0;
}
/*
Main.c: In function 'main':
Main.c:5:18: error: 'a' undeclared (first use in this function)
   scanf("%d,%d",&a,&b);
                  ^
Main.c:5:18: note: each undeclared identifier is reported only once for each function it appears in
Main.c:5:21: error: 'b' undeclared (first use in this function)
   scanf("%d,%d",&a,&b);
                     ^
Main.c:6:3: warning: too many arguments for format [-Wformat-extra-args]
   printf("sum=A+B\n",sum);
   ^
Main.c:4:9: warning: unused variable 'B' [-Wunused-variable]
   int A,B,sum;
         ^
Main.c:4:7: warning: unused variable 'A' [-Wunused-variable]
   int A,B,sum;
       ^
*/

Double click to view unformatted code.


Back to problem 1