Wednesday 27 July 2011

Program to find the greater number from the three nos. using nested if else statement


Classs max
{
             Public static void main (String args[]) 

             {

Int a,b,c;
A=25; b=30; c=10;
if(a>b)

             {

if(a<c)

System.out.println(“a is maximum”);

else

System.out.println(“c is maximum”);

}
else

if(b>c)

System.out.printl(“b is maximum”);

else

System.out.printl(“c is maximum”);
}
               }

}

0 comments:

Post a Comment

Twitter Delicious Facebook Digg Stumbleupon Favorites More