- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbiggestnumber.java
More file actions
Latest commit
28 lines (27 loc) · 734 Bytes
/
Copy pathbiggestnumber.java
File metadata and controls
28 lines (27 loc) · 734 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
importjava.util.Scanner;
publicclassBiggest_Number
{
publicstaticvoidmain(String[] args)
{
intx, y, z;
Scanners = newScanner(System.in);
System.out.print("Enter the first number:");
x = s.nextInt();
System.out.print("Enter the second number:");
y = s.nextInt();
System.out.print("Enter the third number:");
z = s.nextInt();
if(x > y && x > z)
{
System.out.println("Largest number is:"+x);
}
elseif(y > z)
{
System.out.println("Largest number is:"+y);
}
else
{
System.out.println("Largest number is:"+z);
}
}
}