Write a Program to print the following series… 1,2,3,4,5...up to N using Loop in C

#include<stdio.h>
#include<conio.h>
void main()
{
int i,n;
  printf("Enter the number = ");
  scanf("%d",&n);
  for(i=1;i<=n;i++)
  {
    printf("%d\n",i);
  }
getch();
}



OUTPUT :-
Previous Post
Next Post