Write a program in C to display the even or odd numbers of first N numbers ?
program no :19
purpose : print even or odd numbers of first N numbers
#include<"stdio.h">
#include<"conio.h">
void main()
{
int loop,N;
printf("enter N value\n");
scanf("%d",&N);
printf("the even or odd numbers between 1 to %d\n",N);
for(loop=1;loop<=N;loop++)
{
if(loop%2==0)
printf("%d even\n",loop);
else
printf("%d odd\n",loop);
}
getch();
}