Main.cc: In function 'int main()': Main.cc:9:17: error: 'n' was not declared in this scope scanf("%d",&n); ^