WAP to print n natural number with output in c programming
plz help me it's urgent
Answers
Answered by
12
Answer:
#include <stdio.h>
int main() {
int i,n;
scanf("%d", &n);
for(i=1; i<=n; i++)
{
printf("%d\n", i);
}
return 0;
}
Logic:-
- Accept upper limit(n) as input
- run a I loop from 1 to n
- print i
- end the program
TheMoonlìghtPhoenix:
Stupendous
Similar questions