c program to generate odd numbers up to a limit
#include<stdio.h>
#include<conio.h>
void main()
{
int n,i;
printf("enter the limit to generate odd nuymber")
scanf("%d",&n);
printf("generated odd numbers are");
for(i=1;i<n;i++)
if(i%2!=0)
printf("%d",i);
}
getch();
}
#include<conio.h>
void main()
{
int n,i;
printf("enter the limit to generate odd nuymber")
scanf("%d",&n);
printf("generated odd numbers are");
for(i=1;i<n;i++)
if(i%2!=0)
printf("%d",i);
}
getch();
}
Comments
Post a Comment