Program :
class GreatestThree
{
public static void main(String[] args) {
int x = 5 , y = 7 , z = 9 ;
if(x > y && x > z)
System.out.println("x is Greatest");
else
if(y > x && y > z)
System.out.println("Y is Greatest");
else
System.out.println("Z is Greatest");
}
}
Output :
No comments:
Post a Comment