#include <iostream> #include <math.h> using namespace std; int main(){ int m=1,d,pay; float n; while(scanf("%f",&n)!=EOF){ if(n>0&&n<=3) printf("Case #%d: 5",m); else if(n>3){ d = ceil(n-3); pay = 5+ceil(d*1.5); printf("Case #%d: %d",m,pay) } m++; } return 0; } /* Main.cc: In function 'int main()': Main.cc:15:5: error: expected ';' before '}' token } ^ */ |
Double click to view unformatted code.