#include<stdio.h> void main() { int a,b,c; scanf("%d%d,&a&b); c=a+b; printf("%d/n",c); } /* Main.c:2:6: warning: return type of 'main' is not 'int' [-Wmain] void main() ^ Main.c: In function 'main': Main.c:5:12: warning: missing terminating " character scanf("%d%d,&a&b); ^ Main.c:5:6: error: missing terminating " character scanf("%d%d,&a&b); ^ Main.c:6:11: error: expected ')' before ';' token c=a+b; ^ Main.c:6:6: warning: passing argument 1 of 'scanf' makes pointer from integer without a cast c=a+b; ^ In file included from /usr/include/features.h:374:0, from /usr/include/stdio.h:27, from Main.c:1: /usr/include/stdio.h:446:12: note: expected 'const char * restrict' but argument is of type 'int' extern int __REDIRECT (scanf, (const char *__restrict __format, ...), ^ Main.c:8:12: error: expected ';' before '}' token } ^ */ |
Double click to view unformatted code.