Main.cc: In function ‘int main()’:
Main.cc:30:5: error: expected ‘;’ before ‘break’
break;
^~~~~
Main.cc:30:10: warning: statement has no effect [-Wunused-value]
break;
^
Main.cc: In function ‘void nhapmang(int*, int)’:
Main.cc:7:8: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
scanf("%d", &a[i]);
~~~~~^~~~~~~~~~~~~
Main.cc: In function ‘int main()’:
Main.cc:18:7: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
scanf("%d %d", &n, &k);
~~~~~^~~~~~~~~~~~~~~~~