Monday, 8 July 2013

C++ For Loop

#include<iostream.h>
#include<conio.h>
void main()
{
    clrscr() ;        //to clear output screen at the beginning
    int  i   ;        //decleration
   
    for( i = 1 ; i < 5 ;  i++  )
    {
        cout<< i ;
        cout<<" The for loop" ;
        cout<<endl ;
    }
    getch();
}

No comments:

Post a Comment