Main.cc: In function 'int main()': Main.cc:7:2: error: expected ',' or ';' before 'printf' printf("%.2f",s); ^ Main.cc:6:9: warning: unused variable 's' [-Wunused-variable] double s=PI*r*r ^