Respuesta :

Answer:

#include <iostream>

using namespace std;

int main()

{

   int num;

   cout<<"Enter the integer: ";

   cin>>num;

   

   while(num>0){

       

       int rem = num%10;

       cout<<rem<<endl;

       num = num/10;

       

   }

}

Explanation:

First include the library iostream in the c++ programming for input/output.

Then write the main function and declare the variable.

cout is used to display the message on the screen.

cin is used to store the value in the variable.

then used the while loop and put the condition num>0

after that, take the reminder of the number by using the operator modulus '%'.

and then print it on the screen.

after that reduce the number by one digit.

This process continue until the condition not failed.

Therefore, the all digits of the number will be printed.