Tuesday, 29 March 2016

Write a program to print even nos upto 100 using for loop in c++ language.

//wap  to print even nos upto 100 using for loop in c++ language.
#include<iostream.h>
#include<conio.h>

void main()
{
clrscr();

int a;
cout<<"Numbers 1 to 10 are :"<<"\n";
for(a=1;a<=10;a++)
{
cout<<"\n"<<a;
}
getch();
}


Output:-
                     

No comments:

Post a Comment