Program to print squares of Numbers from 1-10 Use “Do-while”loop

#include<stdio.h>
#include<conio.h>
void main()
{

  int i=0,sqr;
  clrscr();
  printf("\n Printf squares of number from 1-10");

  do
  {
    sqr=i*i;
    printf("\n %d ",sqr);
     i++;
  }while(i<=10);

    getch();
}

Leave a Reply