Do While Loop in C++

The difference between the do while loop and other loop is that in do while loop the conditional part is separate to the iteration part.

Source Code 

#include<iostream>
using namespace std;
int main ()
{
 int i=0;
 do
 {
  cout<<i<<" .LEP is the Home of Developers " <<endl;
 i++;
 }
 while(i<5);
 }

Output of the Program

Do while Loop in C++

Share on Google Plus

About Asad

Asad Niazi is Software Engineer , Programmer, Web Developer and a young mentor of BloggersTown and PProgramming. Asad Love to writes about Technology, Programming, Blogging and make money online.
    Blogger Comment
    Facebook Comment

0 comments:

Post a Comment