View Code of Problem 118

import java.util.Scanner;
public class Main {
	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int i=1;
		while(scanner.hasNext()){
			int dt = scanner.nextInt();
			double money =0;
			if(dt<=3) {
				money = 5;
			}else {
				money =  (5+(dt -3)*1.5);
			}
			System.out.println("Case #"+ i++ +": "+(int)Math.ceil(money));
		}
		scanner.close();
	}
}


Double click to view unformatted code.


Back to problem 118