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?

Related Questions

Example of flowchart of while loop in c plus plus?

kk


What are the three selection structures available in C plus plus?

if while switch


How does C plus plus endeavor to represent the loop paradigm?

Iterative loops in C/C++ are represented by for(), while() and do...while() code blocks. Recursive loops are represented by functions calling themselves.


What is the relationship between database and c plus plus?

There is none. While you can access databases from C++, the two concepts are fundamentally different.


What are common in c and c plus plus?

With slight variations, everything in C is included in C++. However, while C is a procedural language, C++ is object-oriented, so C++ essentially shares nothing with C. C++ is, quite literally, the successor to C.


C program to print numbers 1 to n?

how do we use loops in c plus plus programing and what are basic differences between do,for and while loop


Is for loop is faster than while loop in turbo c plus plus compiler?

No, why did you think so?


What is b plus b plus b plus c plus c plus c plus c?

b+b+b+c+c+c+c =3b+4c


What is c plus c plus 2c plus c plus c equal?

c + c + 2c + c + c = 6c


What is the notation used to place block of statements in a looping structure in C plus plus?

for( ; ; ) { statement_block; } while( conditional_expression ) { statement_block; } do { statement_block; }while( conditional_expression )


B plus b plus b plus c plus c plus c plus c equals?

b + b + b + c + c + c + c = 3b + 4c


Where was C plus plus language developed at?

It was developed by Bjarne Stroustrup while he was working at AT&amp;T Bell Labs.