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