#include<stdio.h>
#include<conio.h>
#include<math.h>
int main()
{
int a=1,b=0,i,nm,nms;
while(1)
{
nm = 0;
for(i=1;i<=4;i++)
{
if(i<=2)
nm = nm*10 + a;
else
nm = nm*10 + b;
}
nms = sqrt(nm);
if(nm==(nms*nms))
{
printf("%d is Perfect Square Number of order AABB",nm);
break;
}
else
{
b = (++b)%10;
if(b == a)
b = (++b)%10;
if(b==0)
++a;
}
}
getch();
return 0;
}
No comments:
Post a Comment