Write a program to display odd numbers from 1-10

//this is a program to display odd numbers from 1-10
#include<stdio.h>
#include<conio.h>
void main()
{
int i=1;

printf("\n\nDisplaying Odd numbers from 1-10");

while(i<=10)
{
if(i%2!=0)
{
printf("\n\n%d",i);
}
i++;
}
getch();
}

Previous
Next Post »