- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmathOperation2.java
More file actions
Latest commit
18 lines (17 loc) · 583 Bytes
/
Copy pathmathOperation2.java
File metadata and controls
18 lines (17 loc) · 583 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// utility imports...
importjava.util.Scanner;
classmathOperation2{
publicstaticvoidmain(String[] args) {
// Scanner object...
Scannerinput = newScanner(System.in);
// Taking inputs...
System.out.println("Enter two number: ");
// input section
inta = input.nextint();
intb = input.nextInt();
// math operation to verify the minimum number...
intminimum = (int) (Math.min(a,b));
// displaying output...
System.out.println("The minimum number is: " +minimum);
input.close(); // if doesn't,, the resource will be leaked..
}