#include "math.h" #include "stdio.h" int main() { double N,sum,k=0; while(scanf("%lf",&N)!=EOF) { k++;sum=5; if(N>=0&&N<=3) printf("Case #%.0lf:%.0lf\n",k,sum); else if(N>3) { sum+=(N-3)*1.5; sum=ceil(sum); printf("Case #%.0lf:%.0lf\n",k,sum); } } return 0; } |
Double click to view unformatted code.