Print 1 to 15 numbers - C Program

C program to print 1 to 15 numbers using for loop.

Solution:

#include<stdio.h>
int main()
{
      int i=1;
      for(i=1;i<=15;i++)
      {
            /* This statement is executed till the condition in above 'for loop' is true. The space after %d is used for separating the numbers.*/
            printf("%d  ",i);
      }
      return 0;
}


Output:

print 1 to 15 numbers