Main.cc: In function 'int main()': Main.cc:5:24: error: 'n' was not declared in this scope scanf("%d %d", &t,&n); ^ Main.cc:4:8: warning: unused variable 'a' [-Wunused-variable] int t,a; ^