forked from Programming-Club-IAU/Level-1.2
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTask2.java
More file actions
24 lines (20 loc) · 689 Bytes
/
Task2.java
File metadata and controls
24 lines (20 loc) · 689 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
import java.util.Scanner;
public class Task2{
public static void main(String[] args){
Scanner num1 = new Scanner(System.in);
Scanner num2 = new Scanner(System.in);
System.out.println("Enter the first number: ");
int Num1 = num1.nextInt();
System.out.println("Enter the second number: ");
int Num2 = num2.nextInt();
if (Num1>Num2){
System.out.println("The first number is greater than the second");
}
else if(Num2>Num1){
System.out.println("The second number is greater than the first");
}
else{
System.out.println("The numbers are equal");
}
}
}