- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLarge2.java
More file actions
Latest commit
22 lines (18 loc) · 534 Bytes
/
Copy pathLarge2.java
File metadata and controls
22 lines (18 loc) · 534 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
importjava.util.Scanner;
publicclassLarge2
{
publicstaticvoidmain(String[] args)
{
intnumberOne, numberTwo, largest;
Scannerscan = newScanner(System.in);
System.out.print("Enter the First Number: ");
numberOne = scan.nextInt();
System.out.print("Enter the Second Number: ");
numberTwo = scan.nextInt();
if(numberOne>numberTwo)
largest = numberOne;
else
largest = numberTwo;
System.out.println("\nLargest = " +largest);
}
}