answersLogoWhite

0

The do while loop is useful for the special loops that they must circulate at least one time.

#include <iostream>

using namespace std;

int main()

{

int num,digit;

cout<<"Enter a #\n";

cin>>num;

cout<<"Invers is : ";

do

{

digit=num/10;

cout<<digit;

num/=10;

} while(num != 0);

return 0;

}

User Avatar

Wiki User

15y ago

What else can I help you with?