- 3
Write a Java program to find the largest of three numbers
program should be in Java
3 Antworten
+ 25
import java.util.*;
public class Program {
public static void main(String[] args) {
Scanner inp = new Scanner(System.in);
int a = inp.nextInt();
int b = inp.nextInt();
int c = inp.nextInt();
System.out.println(a>b?(a>c?a:c):(b>c?b:c));
}
}
+ 2
There is many ways.
int a = 5;
int b = 8;
int c = 2;
System.out.println(Math.max(Math.max(a, b), c));
+ 1
Here is my try...
https://code.sololearn.com/crMnndz8XY00/?ref=app