foo.c: In function 'main':
foo.c:7:10: warning: format '%d' expects argument of type 'int *', but argument 2 has type 'int' [-Wformat=]
7 | scanf("%d",k);
| ~^ ~
| | |
| | int
| int *
foo.c:7:2: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
7 | scanf("%d",k);
| ^~~~~~~~~~~~~
foo.c:7:2: warning: 'k' is used uninitialized in this function [-Wuninitialized]
7 | scanf("%d",k);
| ^~~~~~~~~~~~~
foo.c:8:2: warning: 'Sn' is used uninitialized in this function [-Wuninitialized]
8 | for(n=1;Sn<=k;n++){
| ^~~
[Hydro](https://hydro.ac)提供评测服务