#include<stdio.h>
int main()
{
int n, r, i, sqr = 0;
printf("\nENTER THE RANGE.:= ");
scanf("%d", &r);
for (i = 1; i <= r; i++)
{
n = i;
sqr = n * n;
printf("\nSQUARE OF %d is %d .", n, sqr);
}
return 0;
}
ENTER THE RANGE.:= 5
SQUARE OF 1 is 1 .
SQUARE OF 2 is 4 .
SQUARE OF 3 is 9 .
SQUARE OF 4 is 16 .
SQUARE OF 5 is 25 .
No comments:
Post a Comment