//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();
}
#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();
}
No comments:
Post a Comment