View Code of Problem 118

#include <iostream>
#include <cmath>
using namespace std;

int main() {
	int n,k=0;
	while(cin >>n){
		float m=0;
		if(n>0&&n<=3){
			m=5;
		}
		else{
			m+=5;
			m+=1.5*(n-3);
		}
		cout <<"Case #"<<++k<<": "<<ceil(m)<<endl;
		
	}
	return 0;
}

Double click to view unformatted code.


Back to problem 118