-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMinMax2.java
More file actions
33 lines (25 loc) · 707 Bytes
/
MinMax2.java
File metadata and controls
33 lines (25 loc) · 707 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
29
30
31
32
33
package minmax;
import java.util.Scanner;
public class MinMax2 {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
float s;
float a;
float b;
float min = Integer.MAX_VALUE;
int n;
System.out.println("N:");
n = scanner.nextInt();
for (int i = 1; i <= n; ++i) {
System.out.println("A: ");
a = scanner.nextInt();
System.out.println("B: ");
b = scanner.nextInt();
s = a * b;
if (s < min) {
min = s;
}
}
System.out.printf("Eng kichik yuzali To`rtburchak: %.1f \n", min);
}
}