c语言完全平方数n,是指满足叠数形式aabb(8855),且满足n=x^2求满足条件的四位数n
供参考的的求四位数aabb型的完全平方数程序如下:
#include<stdio.h>
#include<math.h>
int main()
{
int h,l,x,n;
for(x=sqrt(1000);x<100;x++)
{
n =x*x;
h=n/100;
l=n%100;
if(h/10==h%10&&l/10==l%10)
printf("The complete square number of aabb type is:%d
",n);
}
return 0;
}
程序的运行结果:
上一篇:设备吊装如何吊进小窗口有什么办法
热门标签: