// This tut contains For,While and do while Loop 
#include<iostream>
using namespace std;
 int main(){
     //*****************For Loop*************************
     for (int i = 1; i < 6; i++)
     {
         cout<<i<<endl;
         cout<<endl;
         cout<<endl;
     }
     cout<<"************************************************************************************************************************"<<endl;
     cout<<"************************************************************************************************************************"<<endl;
     //****************While Loop************************
     int j=1;
     while (j<=10)
     {
         cout<<j<<endl;
         j++;
         cout<<endl;
         cout<<endl;
     }
      cout<<"***********************************************************************************************************************"<<endl;
      cout<<"***********************************************************************************************************************"<<endl;
     //***************do while****************************
     int k=1;
     do
     {
         cout<<k<<endl;
         k++;
         cout<<endl;
         cout<<endl;
     } while (k<=20);
     return 0;
 }
 
 
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.