Computer Science, asked by ayushchadha, 3 months ago

Write a program to print natural numbers 0 till 4

Answers

Answered by pjgaikar06
1

#include <stdio.h>

int main()

{

   int i, n;

   /* Input upper limit from user */

   printf("Enter any number: ");

   scanf("%d", &n);

   printf("Natural numbers from 1 to %d : \n", n);

   /*

    * Start loop counter from 1 (i=1) and go till n (i<=n)

    * increment the loop count by 1 to get the next value.  

    * For each repetition print the value of i.

    */

   for(i=1; i<=n; i++)

   {

       printf("%d\n", i);

   }

   return 0;

}

Answered by ANGEL824
0

Answer:

it is till 10 but reverse

may it helps u

Attachments:
Similar questions