class greatest
{
public static void main(String args[]) {
int a,b,c;
a=Integer.parseInt(args[0]);
b=Integer.parseInt(args[1]);
c=Integer.parseInt(args[2]);
if(a>b&&a>c)
System.out.println(a+" is
greater.");
else if(b>c)
System.out.println(b+" is
greater.");
else
System.out.println(c+" is
greater.");
}
}
OUTPUT:
C:\jdk1.7.0\bin>java
greatest 2 3 1
3 is greater.
No comments:
Post a Comment