View Code of Problem 118

#include<bits/stdc++.h>
using namespace std;

int main() {

	int n;
	int i=0;
	while(cin>>n){
		i++;
		double sum=5;
		if(n>3){
			sum+=(n-3)*1.5;
		}
		printf("Case #%d: %.lf\n",i,ceil(sum));
	}
	return 0;
}

Double click to view unformatted code.


Back to problem 118