In do while loop, the ststement will execute one time first
and then check the condition. One statement will execute in every condition.
Code:
#include <iostream>
#include <string>
using namespace std;
int main() {
int i;
i=0;
do
{
cout<<i<<endl;
i++;
}
while(i<=9);
}
Output:
0
1
2
3
4
5
6
7
8
9
0 Comments