Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Umwandlung einer beliebigen int-Zahl in ein Ziffernfeld
- static int[ ] fromInt(int n) {
- int[] array_n;
- int z;
- int a;
- int j = 0;
- int i = 0;
- while (n > 0) {
- z = n / 10;
- j++;
- if (z == 0) {
- array_n = new int[1];
- array_n[0] = n;
- }
- }
- array_n = new int[j];
- while (n > 0) {
- a = n%10;
- n /= 10;
- i++;
- array_n[i] = a;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement