I am attempting to print a string of numbers to create a specific triangle pattern using an array.
I've tried for loops but int is not allowed for "006095793". Below is what I have tried already.
int[] array2 = {0,0,6,0,9,5,7,9,3};
int k = 006095793;
for(int i = 0; i < array2.length; i++) {
k = k / 10;
System.out.println(k);
}
System.out.println();
I expect the output to be
006095793
00609579
0060957
006095
00609
0060
006
00
0