foo.c: In function 'main':
foo.c:7:19: warning: format '%d' expects argument of type 'int *', but argument 3 has type 'int' [-Wformat=]
7 | scanf("%d%d",&num1,num2);
| ~^ ~~~~
| | |
| int * int
foo.c:8:19: error: 'nun2' undeclared (first use in this function); did you mean 'num2'?
8 | if(num1%4&nun2==2)
| ^~~~
| num2
foo.c:8:19: note: each undeclared identifier is reported only once for each function it appears in
foo.c:9:24: warning: passing argument 1 of 'printf' makes pointer from integer without a cast [-Wint-conversion]
9 | printf(29);
| ^~
| |
| int
In file included from foo.c:1:
/nix/store/3w4yrspgcx1z9wi18rv0hbap4jjlhx4c-glibc-2.37-8-dev/include/stdio.h:356:43: note: expected 'const char * restrict' but argument is of type 'int'
356 | extern int printf (const char *__restrict __format, ...);
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
foo.c:10:16: warning: suggest parentheses around comparison in operand of '&' [-Wparentheses]
10 | if(num2==1&num2==3&num2==5&num2==7&num2==8&num2==10num2==12)
| ~~~~^~~
foo.c:10:32: warning: suggest parentheses around comparison in operand of '&' [-Wparentheses]
10 | if(num2==1&num2==3&num2==5&num2==7&num2==8&num2==10num2==12)
| ~~~~^~~
foo.c:10:40: warning: suggest parentheses around comparison in operand of '&' [-Wparentheses]
10 | if(num2==1&num2==3&num2==5&num2==7&num2==8&num2==10num2==12)
| ~~~~^~~
foo.c:10:48: warning: suggest parentheses around comparison in operand of '&' [-Wparentheses]
10 | if(num2==1&num2==3&num2==5&num2==7&num2==8&num2==10num2==12)
| ~~~~^~~
foo.c:10:58: error: invalid suffix "num2" on integer constant
10 | if(num2==1&num2==3&num2==5&num2==7&num2==8&num2==10num2==12)
| ^~~~~~
foo.c:11:16: warning: passing argument 1 of 'printf' makes pointer from integer without a cast [-Wint-conversion]
11 | printf(31);
| ^~
| |
| int
/nix/store/3w4yrspgcx1z9wi18rv0hbap4jjlhx4c-glibc-2.37-8-dev/include/stdio.h:356:43: note: expected 'const char * restrict' but argument is of type 'int'
356 | extern int printf (const char *__restrict __format, ...);
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
foo.c:13:24: warning: passing argument 1 of 'printf' makes pointer from integer without a cast [-Wint-conversion]
13 | printf(30);
| ^~
| |
| int
/nix/store/3w4yrspgcx1z9wi18rv0hbap4jjlhx4c-glibc-2.37-8-dev/include/stdio.h:356:43: note: expected 'const char * restrict' but argument is of type 'int'
356 | extern int printf (const char *__restrict __format, ...);
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
foo.c:12:9: warning: this 'else' clause does not guard... [-Wmisleading-indentation]
12 | else
| ^~~~
foo.c:14:17: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'else'
14 | return 0
| ^~~~~~
foo.c:14:25: error: expected ';' before '}' token
14 | return 0
| ^
| ;
15 | }
| ~
[Hydro](https://hydro.ac)提供评测服务