AnmolKnowledge
Monday, October 21, 2019
Program to print n natural numbers
#include<stdio.h>
main()
{
int i,n;
printf("enter value of n= ");
scanf("%d",&n);
for(i=1;i<=n;i++)
{
printf("%d",i);
}
}
Output
n=10
1,2,3,4,5,6,7,8,9,10.
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment