print 1,3,5,7,9...

/*print 1,3,5,7,9,11 */

#include
#include
void main()
{
int no=1,i;
clrscr();
printf("enter the number :");
scanf("%d",&i);
while(no<=i)
{
printf(" %d",no);
no=no+2;
}

getch();
}

0 comments:

Post a Comment