> 其他 >
C语言编写一个函数,利用参数传入一个3位数number,找出101~number之间所有满足下列两个条件的数:
程序填空,不要改变与输入输出有关的语句.
编写一个函数,利用参数传入一个3位数number,找出101~number之间所有满足下列两个条件的数:
它是完全平方数,又有两位数字相同,如144、676等,函数返回找出这样的数据的个数.请同时编写主函数.
例:(括号内为说明)
输入
3\x09(repeat=3)
150
500
999
输出
count=2
count=6
count=8
#include
#include
int search(int n);
int main(void)
{
\x09int number,ri,repeat;
\x09scanf("%d",&repeat);
\x09for(ri=1;ri
人气:467 ℃ 时间:2020-01-29 20:39:42
解答
#include <stdio.h>#include <math.h>int search(int n);int main(void){int number, ri, repeat;scanf("%d", &repeat);for (ri&nb...

不会啊

推荐
猜你喜欢
© 2024 79432.Com All Rights Reserved.
电脑版|手机版