import java.util.Scanner;

class Jan21 {
	public static void main(String[] args) {
		// division example

		int x = 3;
		int y = 5;
		int z = 3 / x;
		System.out.println("z: " + z);

		z = y / x;
		System.out.println("z: " + z);

		double w = y / x;
		System.out.println("w: " + w);

		w = y / (double) x;
		System.out.println("w: " + w);
		System.out.printf("%d / %d = %.2f\n", y, x, w);

		// modulus (remainder) example
		int rem = 1 % 2; 
		System.out.printf("rem: %d\n", rem);
		rem = 2 % 2; 
		System.out.printf("rem: %d\n", rem);

		// arithmetic operator precidence
		// see google

		// read data entered by user from keyboard
		// create instance of Scanner class
		Scanner kb = new Scanner(System.in);

		System.out.print("Enter an integer: ");
		int input = kb.nextInt();

		System.out.printf("input: %d\n", input);



	}
}
