import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int max = Integer.MIN_VALUE;
System.out.println("First number:");
max = Math.max(in.nextInt(), max);
System.out.println("Second number:");
max = Math.max(in.nextInt(), max);
System.out.println("Third number:");
max = Math.max(in.nextInt(), max);
System.out.println("Largest: " + max);
}
}
Comments
Leave a comment