lamp.cpp: In function 'int main()':
lamp.cpp:14:38: warning: format '%d' expects argument of type 'int*', but argument 2 has type 'bool*' [-Wformat=]
14 | for(int i=1; i<=n; i++) scanf("%1d", &a[i]);
| ~~^ ~~~~~
| | |
| | bool*
| int*
lamp.cpp:15:38: warning: format '%d' expects argument of type 'int*', but argument 2 has type 'bool*' [-Wformat=]
15 | for(int i=1; i<=n; i++) scanf("%1d", &b[i]);
| ~~^ ~~~~~
| | |
| | bool*
| int*
lamp.cpp:13:10: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
13 | scanf("%d", &n);
| ~~~~~^~~~~~~~~~
lamp.cpp:14:34: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
14 | for(int i=1; i<=n; i++) scanf("%1d", &a[i]);
| ~~~~~^~~~~~~~~~~~~~
lamp.cpp:15:34: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
15 | for(int i=1; i<=n; i++) scanf("%1d", &b[i]);
| ~~~~~^~~~~~~~~~~~~~