tg-me.com/java_codings/5
Last Update:
3. Program to accept three Number and Print Largest among them.
class CommandLineArgs
{
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("Largest Number is : " + a);
} else if (b > c) {
System.out.println("Largest Number is : " + b);
} else {
System.out.println("Largest Number is : " + c);
}
}
}
@java_codings
BY Advance Java π¨βπ»
Warning: Undefined variable $i in /var/www/tg-me/post.php on line 283
Share with your friend now:
tg-me.com/java_codings/5