|
@ -6,6 +6,21 @@ import java.lang.Math; |
|
|
|
|
|
|
|
|
public class ITsecAufgaben { |
|
|
public class ITsecAufgaben { |
|
|
|
|
|
|
|
|
|
|
|
public int ggTLösung(int a, int b) { |
|
|
|
|
|
|
|
|
|
|
|
while (a != b) { |
|
|
|
|
|
if(a > b) |
|
|
|
|
|
a = a - b; |
|
|
|
|
|
else |
|
|
|
|
|
b = b - a; |
|
|
|
|
|
} |
|
|
|
|
|
if (a > b) { |
|
|
|
|
|
return b; |
|
|
|
|
|
} |
|
|
|
|
|
return a; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public int[] randomNumberArray(int[] ausgabe) { |
|
|
public int[] randomNumberArray(int[] ausgabe) { |
|
|
int max = 99, min = 0, range, random; |
|
|
int max = 99, min = 0, range, random; |
|
|
range = max - min + 1; |
|
|
range = max - min + 1; |
|
|