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

Theory, recursive sub programs

recursive sub programs

#minimum shelf, #At a shop of marbles, packs of marbles are prepared. Packe...

#At a shop of marbles, packs of marbles are prepared. Packets are named A, B, C, D, E …….. All packets are kept in a VERTICAL SHELF in random order. Any numbers of packets with the

Named what can derived class add?, New data members  New member function...

New data members  New member functions  New constructors and destructor  New friends

How the operations are performed in a single linked list, Question: (a)...

Question: (a) Explain a linked list. (b) Describe the three different types of linked list with the help of diagrams. (c) Give two advantages and two disadvantages

Strings, A string S is said to be "Super ASCII", if it contains the charact...

A string S is said to be "Super ASCII", if it contains the character frequency equal to their ascii values. String will contain only lower case alphabets (''a''-''z'') and the asci

Functions and stack frame, Each function has its own stack frame between %f...

Each function has its own stack frame between %fp and %sp. Let Caller calls Callee. Then Caller's %sp becomes callee's %fp, and callee's %sp set to be a new value (a smaller one be

Explain different access specifiers in a class, Question 1 Create a class ...

Question 1 Create a class String which stores a string value. Overload ++ operator which converts the characters of the string to uppercase (toupper() library function of "ctype.h

Write a c program as text layout, Your task in this project is to write a C...

Your task in this project is to write a C program named layout.c which does text layout. This is a staged project, complete the stages in order. The maximum mark if you nish each

Develop online slot video game for facebook, Develop Online Slot Video Game...

Develop Online Slot Video Game for Facebook Prepare an online slot video game for a Facebook promotion in order to draw new visits and Increase the number of "likes" of the Face

Padovan string, A Padovan string P(n) for a natural number n is defined as:...

A Padovan string P(n) for a natural number n is defined as: P(0) = ‘X’ P(1) = ‘Y’ P(2) = ‘Z’ P(n) = P(n-2) + P(n-3), n>2 where + denotes string concatenation. For a string of t

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