AnmolKnowledge
Monday, October 21, 2019
Program to print n Odd numbers
#include<stdio.h>
main()
{
int i,n;
printf("enter value n= ");
scanf("&d",n);
for(i=1;i<=n;i++);
{
printf("%d",2*i-1);
}
getch();
}
output
n=10
1,3,5,7,9,11,13,15,17,19.
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment