-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathQ1.java
More file actions
28 lines (23 loc) · 787 Bytes
/
Q1.java
File metadata and controls
28 lines (23 loc) · 787 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
import java.util.Scanner;
class Q1 {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int one, two, three;
System.out.println("Enter First Number:");
one = sc.nextInt();
System.out.println("Enter Second Number:");
two = sc.nextInt();
System.out.println("Enter Third Number:");
three = sc.nextInt();
if (one>two && one>three) {
System.out.println(one+" is the Greatest!!");
}
else if (one<two && two>three) {
System.out.println(two+" is the Greatest!!");
}
if (three>two && one<three) {
System.out.println(three+" is the Greatest!!");
}
sc.close();
}
}