
import java.util.Scanner;

class Sep13 { 
	public static void main(String[] args) { 
		Scanner kb = new Scanner(System.in);


		// Ask user to enter an integer and read it
		System.out.print("Please enter an integer: ");
		int input = kb.nextInt();

		// if input is >= 90, set option to 'A', otherwise
		// set option to 'B'

		char option = '\0';
		if(input >= 90) {
			option = 'A';
		}
		else {
			option = 'B';
		}

		System.out.println("option: " + option);

		// better way
		option = (input >= 90) ? 'A' : 'B';

		/*
			Set option based on this table
			<input> 	<option>
			>= 90		A
			>= 80 < 90 	B
			>= 70 < 80 	C
			else 		D
		*/
	
		if (input >= 90) {
			option = 'A';
		}
		else if (input >= 80 && input < 90) {
			option = 'B';
		}
		else if (input >= 70 && input < 80) {
			option = 'C';
		}
		else {
			option = 'D';
		}

		/* set cost according to following table */

		/*
			<input> 	<cost>
			0		0
			1		100
			2 		150
			3		175
			otherwise	0
		*/

		int cost = 0;

		if (input == 0) {
			cost = 0;
		}
		else if (input == 1) {
			cost = 100;
		}
		else if (input == 2) {
			cost = 150;
		}
		else if (input == 3) {
			cost = 175;
		}
		else {
			cost = 0;
		} 

		/* alternate soltion with switch statement */

		/* You can switch on int, char, Strings */

		switch (input) {
			case 0:
				cost = 0;
				break;
			case 1:
				cost = 100;
				break;
			case 2:
				cost = 150;
				break;
			case 3:
				cost = 175;
				break;
			default:
				cost = 0;
		}

		System.out.println("cost: " + cost);			
	}
}

