View Code of Problem 118

#include<stdio.h>
#include<string.h>
#include "math.h"
int main()
{
	int n,i,sum,k,fee;
	while(scanf("%d",&n)!=EOF)
	{
		k++;
		if(n<=3)
		  printf("Case #%d: 5\n",k);
		else
		{
			fee=5+(n-3)*1.5+0.5;
			printf("Case #%d: %d\n",k,fee);
		}
		
	}

	return 0;
}

Double click to view unformatted code.


Back to problem 118