socks.cpp: In function 'int main()':
socks.cpp:6:13: warning: format '%d' expects argument of type 'int*', but argument 2 has type 'int' [-Wformat=]
6 | scanf("%d",n);
| ~^ ~
| | |
| | int
| int*
socks.cpp:11:17: warning: format '%d' expects argument of type 'int*', but argument 2 has type 'int' [-Wformat=]
11 | scanf("%d",x);
| ~^ ~
| | |
| | int
| int*
socks.cpp:6:10: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
6 | scanf("%d",n);
| ~~~~~^~~~~~~~
socks.cpp:11:14: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
11 | scanf("%d",x);
| ~~~~~^~~~~~~~
socks.cpp:6:10: warning: 'n' is used uninitialized in this function [-Wuninitialized]
6 | scanf("%d",n);
| ~~~~~^~~~~~~~
socks.cpp:7:9: warning: 'x' may be used uninitialized in this function [-Wmaybe-uninitialized]
7 | int x,i;
| ^