-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathArray58.java
More file actions
28 lines (25 loc) · 646 Bytes
/
Array58.java
File metadata and controls
28 lines (25 loc) · 646 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
package array;
import array.uitl.ArrayUtil;
/**
* Project Admin -> Husanboy Azamov
* Package Name -> array
* Class Name -> Array58
* Copyright © : 6/26/2022
*/
public class Array58 {
public static void main(String[] args) {
array58(new int[]{
1,2,3,4,5,6,7,8,9,10,11,12,13,14
});
}
public static void array58(int[]array){
int[] array2 =new int[array.length];
for (int i = 0; i < array.length; i++) {
array2[i]=0;
for (int j = 0; j <=i; j++) {
array2[i]+=array[j];
}
}
ArrayUtil.show(array2);
}
}