@@ -0,0 +1,526 @@
+package array3;%0A%0Aimport java.util.Arrays;%0A%0Apublic class SeriesUpTest %7B%0A%0A%09public static void main(String%5B%5D args) %7B%0A%0A%09%09SeriesUpTest test = new SeriesUpTest();%0A%09%09System.out.println(Arrays.toString(test.seriesUp(3)));%0A%09%09System.out.println(Arrays.toString(test.seriesUp(4)));%0A%09%09System.out.println(Arrays.toString(test.seriesUp(2)));%0A%09%7D%0A%0A%09public int%5B%5D seriesUp(int n) %7B%0A%09%09int%5B%5D result = new int%5Bn * (n + 1) / 2%5D;%0A%09%09int i = 0;%0A%09%09for (int j = 1; j %3C= n; ++j)%0A%09%09%09for (int k = 1; k %3C= j; ++k)%0A%09%09%09%09result%5Bi++%5D = k;%0A%09%09return result;%0A%09%7D%0A%7D%0A

Add SeriesUpTest