/*
	- Oracle Java Website
	- Coding Rule #4 - Indent consistently

	- vi commands
		- go to end of line: shift + $ 
		- go to start of line: shift + ^
		- go to matching }: shift + %

	- multiples of an integer
	- divisors of an integer
	 
*/

import java.util.Scanner;
import java.io.PrintStream;

class Sep9 {
	static PrintStream o = System.out;

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

		o.println("Please enter two integers");
		int dividend = kb.nextInt();
		int divisor = kb.nextInt();

		int remainder = dividend % divisor;
		o.printf("%d mod %d = %d\n", dividend, divisor, remainder);

		// Print "a multiple" if dividend is a multiple of divisor;
		// otherwise print "not a multiple"

		if (remainder == 0) {
			o.println("a multiple");
		}
		else {
			o.println("not a multiple");
		}

		// x is a divisor of y IF y % x is 0

		// switch statement

		if (..) { 
		
		}
		else if (..) {

		}
		else if (..) {

		}
		else if (..) {

		}
		else {

		}
	
		// Advice: if you have 4 or more chained if-else-if blocks, 
		// then consider using a switch statement instead.

		o.println("Enter integer");
		int x = kb.nextInt();;
		
		if(x == 1) {
			o.println("1");
		}	
		else if(x == 2) {
			o.println("2");
		}	
		if(x == 3) {
			o.println("3");
		}
		else {
			o.println("some other number");
		}	

		// this is an equivalent fragment of the code above	
		switch(x) {
			case 1:
				o.println("1");
				break;
			case 2:
				o.println("2");
				break;
			case 3:
				o.println("3");
				break;
			default:
				o.println("some other number");
		}

        // In Java, you can switch on variables of type byte, short, char, int, and String.
	
	}
}
