-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathfor27.java
More file actions
33 lines (24 loc) · 683 Bytes
/
for27.java
File metadata and controls
33 lines (24 loc) · 683 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 fori;
import java.util.Scanner;
public class for27 {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
float a;
float min = Integer.MAX_VALUE;
float minnum = 0;
float max = 0;
int n;
System.out.print("N:");
n = scanner.nextInt();
for (int i = 1; i <= n; ++i) {
System.out.print(i + "-");
a = scanner.nextInt();
if ( (a < min)) {
min = a;
minnum = i;
}
}
System.out.println("Element Raqami:"+minnum);
System.out.println("Eng kichik son: "+min);
}
}