#include<stdio.h>
#include<conio.h>
main()
{
int num,square;
char another;
clrscr();
do
{
printf("\n enter the number num");
scanf("\n %d",&num);
square=num*num;
printf("\n square =%d",square);
printf("\n want to enter another num y/n");
scanf("\n %c",&another);
}
while(another=='y');
return (0);
}
output:-
enter the num=5
square=25
want to enter another num y/n
y
enter the num=10
square=100
want to enter another num y/n