To find which of the entered Number is the Greatest
/* To find which of the 3 numbers are greatest
*/
public class GR8nSmall
{
public static void main(int a,int b,int c)
{
if ((a>b)&&(a>c))
System.out.println("The Greatest number is"+a);
if ((b>a)&&(b>c))
System.out.println("The Greatest number is"+b);
if ((c>a)&&(c>b))
System.out.println("The Greatest number is"+c);
}
}
No comments:
Post a Comment