Program to print squares of Numbers from 1-10

#include<stdio.h>
#include<conio.h>
void main()
{
   int i=1,sqr=0;
   clrscr();
   printf("\n SQUARES OF NO. 1 TO 10");
   while(i<=10)
   {
      sqr=i*i;
      printf("\n NUMBER=>%d",i); printf("\n \t\t Squares=%d",sqr);
      i++;
   }
getch();
}

Leave a Reply