Thursday, 11 May 2017

C++ Tutorials for begginners (hindi/urdu) [part 14]





#include<constream.h>

#include<iomanip.h>

void main(){

clrscr();

 

    int limit;

    cout<<"Enter the limit"<<endl;

    cin>>limit;

   

    for(int i=0;i<=limit;++i)

    {

        if(i%2==0)

            cout<<i<<" is even number";

        else

            cout<<i<<" is odd number";

    }



getch();

}


No comments:

Post a Comment