1//Executes a statement repeatedly, until the value of condition becomes false.
2//The test takes place before each iteration
3while(condition) {
4 statement
5}
1#include <iostream>
2#include <string>
3using namespace std;
4
5int main()
6 {
7 cout<<"Printing 2's multiples less than 20"<<endl;
8 int i=2;
9 do
10 {
11 cout<<"i = "<<i<<"\t";
12 i += 2;
13 }while(i<=20);
14 }
15