0_0_22426325_7152.cpp: In function 'int main()': 0_0_22426325_7152.cpp:25:9: error: expected ')' before 'printf' if (ans printf("%.3lf\n",ans); else printf("%.3lf\n",h*1.0); } return 0; } ^