Thursday, July 25, 2019

Print to odd and even number between 1 to10

Tags

Print to odd number between 1 to10


print to odd and even number between 1 to 10

#include<stdio.h>
#include<conio.h>

void main()
{
int i;
clrscr();

for(i=1;i<=10;i++)
{
if(i%2==0)
{
printf("\n Even %d",i);
}
else
{
printf("\n Odd %d",i);
}

}
getch();
}

Output:



EmoticonEmoticon