/**
 *
 * @author Damien Bell <SkyeShatter@gmail.com>
 */
import java.lang.Math;
import java.util.Scanner;
class Jtutorial1 {
    public static void main(String args[]){
     Scanner input = new Scanner(System.in);
        // Declare a double, run some tests on it.
        // Is it even or odd?  Is it a perfect square?   Is it a whole number?
        // Is the number squared even?  
        
        //<, <=, >, >=, || ,  &&,  !=
        
     
        double choice=0;
        boolean isEven=false, isPS=false, isWhole=false, isSquaredEven=false;
        
        
        System.out.println("Enter a value for the variable: ");
        choice = input.nextDouble();
        
        //even
        if((choice%2) < 1){
            isEven=true;
            //System.out.println("The number " + choice + " is even prior to the decimal point. ");
        }
        else{
            isEven=false;
            //System.out.println("The number " + choice + " is NOT even. ");
        }
        
        //perfect square
        if(((Math.sqrt(choice))%1) == 0){//sqrt(9) == 3
            isPS=true; 
            //System.out.println("The number " + choice + "  is a perfect square: " + Math.sqrt(choice));
        }
        else{
            isPS=false;
            //System.out.println("The number " + choice + " is NOT a perfect square: " + Math.sqrt(choice));
        }
        
        if ((choice%1) == 0){
            isWhole=true;
            //System.out.println("The number " + choice + " is a whole number: ");
        }
        else {
            isWhole=false;
             //System.out.println("The number " + choice + " is NOT a whole number: ");
        }
        
        if((((Math.pow(choice, 2)))%2) == 0){
            isSquaredEven=true;
            //System.out.println("The number " + choice + " squared is even: "+ Math.pow(choice, 2));
        }
        else{
            isSquaredEven=false;
             //System.out.println("The number " + choice + " squared is NOT even: " + Math.pow(choice, 2));
        }
        
        if(isEven){
            System.out.println("The number is even. ");
        }
        if(isPS){
            System.out.println("The number is a perfect square. ");
        }
        if(isWhole){
            System.out.println("The number is whole. ");
        }
        if(isSquaredEven){
            System.out.println("The number sqared is even. ");
        }        
        
        
        
        
    } //End main
} //End class
