-->
Showing posts with label series. Show all posts
Showing posts with label series. Show all posts

hseb solution:Program to get series 1,3,5,7....

//program  to print/display series 1 ,3,5,7,.......nth.
#include<stdio.h>
#include<conio.h>
void main()
{
int k,n;
printf(enter value of 'n'\n");
scanf("%d",&n);
for(k=1;k<=n;k=k+2)
   {          
       printf("%d,",k);
   }
getch();
}