-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbtk3.2.java
More file actions
30 lines (26 loc) · 845 Bytes
/
btk3.2.java
File metadata and controls
30 lines (26 loc) · 845 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
int max;
System.out.println("enter number: ");
Scanner n = new Scanner(System.in);
int number = n.nextInt();
System.out.println("enter number: ");
Scanner n1 = new Scanner(System.in);
int number1 = n1.nextInt();
System.out.println("enter number: ");
Scanner n2 = new Scanner(System.in);
int number2 = n2.nextInt();
if (number < number1) {
max = number1;
if (max < number2)
System.out.println(number2);
else System.out.println(max);
} else {
max = number;
if (max < number2)
System.out.println(number2);
else System.out.println(max);
}
}
}