Search Java Programs

Showing posts with label Determining-the-largest-number. Show all posts
Showing posts with label Determining-the-largest-number. Show all posts

Tuesday, January 19, 2010

Determining the largest number

class largernumber{
public static void main(String[] args) {
int x=500, y=70, z=3000;
if (x>y){
if (x>z){
System.out.println("x is greater");
}
else{
if(z>y){
System.out.println("z is greater");
}
else{
System.out.println("y is greater");
}
}
}
else{
if (y>z){
System.out.println("y is greater");
}
}
}
}

Website Design by Mayuri Multimedia