025. Write a Program to print numbers 1 to n using while loop in C language

#include<stdio.h>
#include<conio.h> 
main()
{
  int i=1,n;
  clrscr();
  printf("Enter n : ");
  scanf("%d",&n);
  while(i<=n)
  {
	   printf("%d\t",i);
	   i++;
  }
  getch();
}

Leave a Reply

Your email address will not be published. Required fields are marked *