-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathArray49.java
More file actions
35 lines (30 loc) · 771 Bytes
/
Array49.java
File metadata and controls
35 lines (30 loc) · 771 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
34
35
package array;
/**
* Project Admin -> Husanboy Azamov
* Package Name -> array
* Class Name -> Array49
* Copyright © : 6/25/2022
*/
public class Array49 {
public static void main(String[] args) {
array49(new int[]{31,32,23,31});
}
public static void array49(int[] array) {
int j;
int i;
for (i = 1; i <= array.length; i++) {
for (j = 0; j < array.length; j++) {
if (array[j] == i) {
j = array.length + 100;
break;
}
}
if (j != array.length + 100) {
System.out.print(i+" ");
}
}
if (i == array.length + 1) {
System.out.println(0+" ");
}
}
}