Skip to content

Commit 7d9d45d

Browse files
committed
Initial commit
1 parent 47c8d6b commit 7d9d45d

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed
+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
package Question.ortancilEded;
2+
3+
import java.util.Random;
4+
import java.util.Scanner;
5+
6+
public class OrtaEded {
7+
public static void main(String[] args) {
8+
Scanner scanner = new Scanner(System.in);
9+
System.out.print("daxil edin : ");
10+
say(scanner.nextInt());
11+
}
12+
public static void say(int count){
13+
Random random = new Random();
14+
int arr[] = new int[count];
15+
16+
for (int i = 0; i <count; i++) {
17+
arr[i] = random.nextInt(10);
18+
System.out.println(" "+arr[i]);
19+
}
20+
System.out.println("netice : "+arr[count/2-1]);
21+
}
22+
23+
}

0 commit comments

Comments
 (0)