Following are the java program to the given question:
import java.util.*;//import package
public class Main //defining a class Main
{
public static void main(String[] args)//defining main method
{
Scanner ox = new Scanner(System.in);//creating Scanner class object
System.out.print("Enter a positive integer: ");//println message
int num = ox.nextInt();//input number
while (num > 0) //defining while loop that check num value greater than 0
{
System.out.println( num % 10);//printing remainder value
num=num / 10;//holding quotient value
}
}
}
Output:
Please find the attached file.
Program Explanation:
Learn more:
brainly.com/question/24322104