- 博客(1)
- 收藏
- 关注
原创 找出100至x(x≤999)之间各位上的数字之和为15的所有整数,然后输出;符合条件的整数个数作为函数值返回。
#include <stdio.h> int fun(int x) { int n, s1, s2, s3, t; n = 0; t = 100; while (t <= x) { s1 = t % 10; s2 = (t / 10) % 10; s3 = t / 100; if (s1 + s2 + s3 == 15) { printf("%d ", t); ...
2022-02-14 16:06:22
970
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人