/**
 * Demonstrates various if statements.
 *
 * @author Terry Sergeant
 * @version In Class Demo
 *
*/

import java.util.Scanner;

public class IfDemo
{
	public static void main(String [] args)
	{
		int    x,y;
		String temp;
		Scanner kb= new Scanner(System.in);

		System.out.print("Enter a value for x:  ");
		x= kb.nextInt();

		System.out.print("Enter a value for y:  ");
		y= kb.nextInt();

		if (x==5)
	   System.out.println("x is equal to 5");
		else
	   System.out.println("x is NOT equal to 5");

		System.out.println("x is "+x);
		System.out.println("y is "+y);

		if (x > 0) 
			System.out.println("x is big!");

		if (y > 0) 
			System.out.println("y is big!");
		
		if (x==y)
			System.out.println("they are equal!");

		if (x > y) 
			System.out.println("but x is bigger than y!");
		else
			System.out.println("but y is bigger than or equal to x!");  // is this right?

		if (x < 0 && x > y)
			System.out.println("x is small but it is bigger than y!");
		
	}
}

