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:22:61: error: invalid operands of types 'int' and 'const char [2]' to binary 'operator<<'
22 | printf((arr[i][0]<arr[i][1]?arr[i][0]:arr[i][1])<<" "<<(arr[i][1]>arr[i][0]?arr[i][1]:arr[i][0]));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
| | |
| int const char [2]
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);
| ~~~~~^~~~~~~~