-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProgram04_Lowest.java
More file actions
32 lines (29 loc) · 1.01 KB
/
Program04_Lowest.java
File metadata and controls
32 lines (29 loc) · 1.01 KB
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
31
32
// Write a Java Program to find the Lowest Number of the 3 entered Numbers.
// Date : 20/12/2023, Author : Yash Wadhvani
import java.util.*;
public class Program04_Lowest {
public static void main(String[] args) {
try (Scanner sc = new Scanner(System.in)) {
int a, b, c;
System.out.println("Enter 1st No. :- ");
a = sc.nextInt();
System.out.println("Enter 2nd No. :- ");
b = sc.nextInt();
System.out.println("Enter 3rd No. :- ");
c = sc.nextInt();
if (a < b) {
if (a < c) {
System.out.println("\n" + a + " Is Lowest.");
} else {
System.out.println("\n" + c + " Is Lowest.");
}
} else {
if (b < c) {
System.out.println("\n" + b + " Is Lowest.");
} else {
System.out.println("\n" + c + " Is Lowest.");
}
}
}
}
}