Main.cc: In function ‘int main()’: Main.cc:3:2: error: ‘scanf’ was not declared in this scope scanf("%d",&n); ^~~~~ Main.cc:8:2: error: ‘printf’ was not declared in this scope printf("%d",sum); ^~~~~~ Main.cc:8:2: note: suggested alternative: ‘int’ printf("%d",sum); ^~~~~~ int