Hey guys,
i'm sure u're able to help me. I just tried to fill an array with some numbers, calculated by a other function.
I just tried to print this array as array, but it doesnt work.
Maybe its just about the main method.
public static void main(String[] args) { ggT(5); } public static int ggT(int a, int b) { while(a!=b){ if(a>b) { a=a-b; } else { b=b-a; } } return a; } public static void ggT(int a) { int[][] array = new int[1000][2]; for(int i=0; i<=1000; i++) { array[i][0] = i; array[i][1] = ggT(a,i); } for(int j=0; j<=1000; j++) { for(int z=0; z>=2; z++) { System.out.println(array[j][z]); } } }
Sry about the bad post, i just didnt find, how i can post source code properly.
Greetings Necator