Computer Science, asked by kanakg, 1 month ago

WAP to print n natural number with output in c programming
plz help me it's urgent​

Answers

Answered by BrainlyProgrammer
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