Thursday, March 8, 2012

Show all odd numbers from 0 to your entered no.

//Show all odd numbers from o to your entered no.
#include<stdio.h>
#include<conio.h>
main()
{ int i,n;
  printf("Enter any no-");
  scanf("%d",&n);
  printf("Odd no is-");
  for(i=1;i<=n;i=i+2)
  {
     printf("%d\n",i);
 
     }
     getch();
     }
    

No comments:

Post a Comment