求具有abcd=(ab+cd)2性质的四位数。(2表示平方) 例如:2025=(20+25)^2
**输出提示信息:“There are following numbers:\n”
**输出格式要求:"%d "(注意%d后面有两个空格)
程序运行示例如下:
There are following numbers: 2025 30** 98**(注:因答案只有一个,为避免漏题,后两位用*替代)
#include <stdio.h>
#include <math.h>
int main()
{
int a, b;
printf("There are following numbers:\n");
for(a = 1; a < 100; a++)
{
for(b =1; b < 100; b++)
{
if(a * 100 + b == pow((a + b),2))
{
printf("%d ", a * 100 + b);
}
}
}
return 0;
}