0_0_39633852_29016.cpp: In function 'int main()':
0_0_39633852_29016.cpp:8:12: error: 'scanf' was not declared in this scope
8 | if(scanf("%d",&M)!=1)
| ^~~~~
0_0_39633852_29016.cpp:12:13: error: 'scanf' was not declared in this scope
12 | scanf("%d",&num);
| ^~~~~
0_0_39633852_29016.cpp:15:9: error: 'printf' was not declared in this scope
15 | printf("%d\n",sum);
| ^~~~~~
0_0_39633852_29016.cpp:1:1: note: 'printf' is defined in header '<cstdio>'; did you forget to '#include <cstdio>'?
+++ |+#include <cstdio>
1 | int main() {
|