/*The easiest way to use while statement or while loop*/
#include<iostream>
#include<conio.h>
using namespace std;
int main()
{
cout<<"While Loop\n";
int i, s=0;
i=1;
while(i<=10)
{
cout<<"\nI="<<i;
i++;
}
getch();
}
/*The easiest way to use do-while statement or do-while loop*/
#include<iostream>
#include<conio.h>
using namespace std;
int main()
{
cout<<"Do-While Loop\n";
int i, s=0;
i=1;
do
{
cout<<"\nI="<<i;
i++;
}
while(i<=10);
getch();
}
/*The easiest way to use for statement or for loop*/
#include<iostream>
#include<conio.h>
using namespace std;
int main()
{
cout<<"For Loop\n";
int i;
for(i=1;i<=10;i++)
{
cout<<"\nI="<<i;
}
getch();
}