while even numbers

Program to generate series of even numbers from 1 to 100



#include <iostream.h>

#include <conio.h>

int main()

{

int a=1;

while (a<=100)

{

if (a%2==0)

cout<<a<<"\t";

a++;

}

getch();

return 0;

}

No comments :

Post a Comment