Give example of the do while loop, C/C++ Programming

Assignment Help:

The do..while Loop

The general format is as follows :

                do

{

                                statements;

                                :

                                :

                 }             while(condition);

 

e.g.

                do

                 {

                                cout << x;

                 }             while( x < = 10);

The do.. while loop is exactly like while loop, with single difference. Here testing is done after implementing the statements inside the loop and if the condition evaluates to true then we enter the loop again ,while in while only after the expression is checked we enter the loop.  We can say do loop is implemented at least once.

 


Related Discussions:- Give example of the do while loop

Last fibonnaci standing, i need a program for finding the last fibonacci nu...

i need a program for finding the last fibonacci number

Palindorme, program coding for the conversion of string to a palindrome

program coding for the conversion of string to a palindrome

Described smart pointer?, A: A smart pointer is a C++ class which mimics a ...

A: A smart pointer is a C++ class which mimics a regular pointer in syntax and some semantics, however it does more. Since smart pointers to distinct types of objects tend to have

Explain reference oddities, Reference Oddities A reference variable can...

Reference Oddities A reference variable can demote to any integer variable, be it in an array or a member variable from structure or class. Reference variables can demote to co

Luminous Jewels - The Polishing Game, Byteland county is very famous for lu...

Byteland county is very famous for luminous jewels. Luminous jewels are used in making beautiful necklaces. A necklace consists of various luminous jewels of particular colour. Nec

Loops, how do i print out invalid input?

how do i print out invalid input?

Write the recursive bisection root finding function, Rewrite the recursive...

Rewrite the recursive bisection root finding function from lecture to be iterative (using a while loop). The function declaration should be root = bisectIter(f,a,b,tol). The input

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd