View Code of Problem 118

#include<stdio.h>

int main(){
	
	int n;
	int i =0;
	int start = 5;
	while(scanf("%d",&n)!=EOF){
		i++;
		if(n<=3){
			printf("Case #%d: 5\n",i);
		}else{
			double x = (n-3)*1.5;
			int b = (int)x;
			if(x-b>0)b++;
			printf("Case #%d: %d\n",i,b+5);
		}
	}
} 

Double click to view unformatted code.


Back to problem 118