解题思路:
注意事项:
参考代码:
#include<stdio.h>
int f(int n);
int main()
{
int i;
for(i=1000;i<=9999;i++)
if(f(i)) printf("%d ",i);
return 0;
}
int f(int n)
{
int tem,t;
tem=n/100;
t=n%100;
if((tem+t)*(tem+t)==n) return 1;
else return 0;
}
0.0分
1 人评分
C语言程序设计教程(第三版)课后习题6.10 (C语言代码)浏览:745 |
母牛的故事 (C语言代码)浏览:915 |
C语言训练-大、小写问题 (C语言代码)浏览:611 |
WU-拆分位数 (C++代码)浏览:775 |
sizeof的大作用 (C语言代码)浏览:1020 |
C二级辅导-求偶数和 (C语言代码)浏览:671 |
2005年春浙江省计算机等级考试二级C 编程题(2) (C语言代码)浏览:565 |
杨辉三角 (C语言代码)浏览:675 |
字符串的修改 (C语言代码)浏览:1136 |
C语言程序设计教程(第三版)课后习题1.5 (C语言代码)浏览:490 |