Share all news to all guy ;)

Saturday, December 20, 2014



    About this , it's will find a Maximize of Three Number ;) . The User Need to Input Three Integer and then its will show the Maximize Number :D .


Here Code :

public static void main(String[] args) {
        int n1,n2,n3,Maxi;
        Scanner In = new Scanner(System.in);
       
        System.out.print("First Integer Numer: ");
        n1 = In.nextInt();
       
        System.out.print("Second Integer Number: ");
        n2 = In.nextInt();
       
        System.out.print("Third Integer Number: ");
        n3 = In.nextInt();
       
        if(n1 > n2 && n1>n3)
            Maxi=(n1);
        else if (n2 > n1 && n2>n3)
            Maxi=(n2);
        else
            Maxi=n3;
       
        System.out.println("Maximize Number is: " + Maxi);
       
    }
   
}

0 comments:

Post a Comment

Popular Posts

Powered by Blogger.