Monday 8 July 2013

IF Statement tutorial in C++

#include<iostream.h>
#include<conio.h>
void main()
{
    clrscr() ;        //to clear output screen at the beginning
    int  i ;        //decleration   
    cout<<"Enter any number: ";
    cin>>i ;
   
    if( i > 50 )
    {
        cout<<"The number is greater than 50 ";
        cout<<endl;
    }
    getch();
}

No comments:

Post a Comment