Convert integer number to String. Length of of this String gives you info, how many digits are. Create int[string.length()] array. Use loop to transcribe all values. On fly convert particular values to int.
Find a better solution (using % and / operators).

i can't think of a solution that uses the modulo operator

Convert integer number to String. Length of of this String gives you info, how many digits are. Create int[string.length()] array. Use loop to transcribe all values. On fly convert particular values to int.
Find a better solution (using % and / operators).

public class Convert {
//1. base form
static int[] convert(int k) {
int[] result = null;
return result;
}
static int[] convert2(int k) {
int size = 3;//arbitrary
int[] result = new int[size];
return result;
}
static int[] convert3(int k) {
int size = 8;
int[] result = new int[size];
for (int i = 0; i < size; i++) {
result[i] = k % 10;
// what can i do with k?
}
return result;
}
public static void main(String[] args) {
int k = 576;
int[] result = convert(k);
//int[] result = convert2(k);
//int[] result = convert3(k);
System.out.println(k);
System.out.println(result[0]);
System.out.println(result[1]);
System.out.println(result[2]);
//System.out.println(result[3]);
}
}

array is a good place, to store calculated values.
Write once, use many times.
Continue...

Hello guys, hope you all fine,,
I have a problem when coding using python and opencv.
My project is to track the ball in model soccer pitch using raspberry pi ...