import java.util.Scanner;

class Sep10 {
	public static void main(String[] args) {

		Scanner kb = new Scanner(System.in);
	
		/*
		 * Repeat example showing you need to skip the newline character
		 * before calling kb.nextLine() IF you've previously called kb.next()
		 * or any of the kb.nextTYPE() methods.
		 */

		System.out.println("enter int");
		int x = kb.nextInt();
		System.out.println("x is " + x);

		kb.skip("\\R");
		
		System.out.println("enter address");
		String line = kb.nextLine();
		System.out.println("line is " + line);

		/*
		 * Many ways to declare a variable and intialize it.
		 */
	
		int a = 1;  			// hard coding
		int b = kb.nextInt(); 	// read data from user
		int c = (a * 2) + b; 	// mathematical expression

		/*
		 * Many ways to modify the value in a variable
		 */

		int z = kb.nextInt();	// read data from user
		z = 10;					// hard coding

		/*
		 * Mathematical operators
		 */

		z = z + 1;   			// z has the value 11
		z++;					// increment operator, z holds 12

		z--; 					// decrement operator, z holds 11

		z = z + 3;  			// set z equal to current value in z plus 3
		z += 3;					// equivalent to above syntax

		z = z - 5;  			// set z equal to current value in z minuz 5
		z -= 5;					// equivalent to above syntax

		// We can also use *= and /=

		/*
		 * Modulus - computes the remainder after division
		 */

		int w = 10 % 2;   		// set w equal to the remainder of 10 divided by 2
								// w holds 0

		w = 11 % 2;				// w holds 1

		/*
		 * Be careful with division. Remember there is integer and floating point division
		 */

		double num = 10 / 3;	// integer division since both operands are ints; num holds 3
		num = 10 / 3.0;  		// floating-point division; num holds 3.33333... 
		int y = (int) (10.0 / 3.0);  	// j holds 3 after casting to an int;

		z = w * -1;				// set y to the negation of z
		z = -y;					// equivalent to above

		/*
		 * Remember Order of precedence
		 */

		// highest 	() parenthesis 
		// 			*,/ from left to right
		//			+,- from left to right

		int k = (z + 4) * (7 - y) + 8;			

		double area = 7 * Math.pow(z,2);		// methods are evaluated first
	}
}

// end of file
