Main.cc: In function ‘int main()’: Main.cc:18:17: error: expected ‘:’ before ‘printf’ default printf("error"); ^~~~~~ Main.cc:4:10: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result] scanf("%d",&a); ~~~~~^~~~~~~~~