The person must create a while loop to create an algorithm extractDigits that prints the individual digits of an integer. Ex) extractDigits(123) outputs "3", "2", "1".
I am not sure why exactly this method is correct and able to return each digit.
while(num > 0)
       {
            System.out.println(num % 10);
            num = (num/10);
        }
 
     
    