1120: C语言训练-"水仙花数"问题2 摘要:简简单单,回味无穷 ```cpp #include using namespace std; int s3(int g) { return g*g*g; } int main(…… 题解列表 2022年09月11日 0 点赞 0 评论 231 浏览 评分:9.9
水仙花数问题2 摘要:解题思路:注意事项:参考代码:for n in range(100,1000): a=n%10 #个位 b=int(n/10)%10 #十位 int()强转:强转成整数 c…… 题解列表 2023年04月19日 0 点赞 0 评论 163 浏览 评分:9.9
C语言训练-"水仙花数"问题2 C语言 摘要:解题思路:将三位数分成三个数字,三个for循环遍历,最后一个循环中if判断是否为水仙花数注意事项:百位数的循环从1开始参考代码:#include <stdio.h>int main(){ i…… 题解列表 2022年01月15日 0 点赞 2 评论 751 浏览 评分:9.9
C语言训练-"水仙花数"问题2(小白写C++) 摘要:#include<iostream> using namespace std; int main() { int i,a,b,c; for(i=100;i<100…… 题解列表 2022年10月25日 0 点赞 0 评论 165 浏览 评分:9.9
C语言训练-"水仙花数"问题2 问题一略作修改 摘要:解题思路:注意事项:参考代码:#include <stdio.h>#include <stdlib.h>int main(){ int num=100,o,t,h; //scanf("%d…… 题解列表 2021年06月29日 0 点赞 0 评论 462 浏览 评分:9.9
题解 1120: C语言训练-"水仙花数"问题2 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int main(){ int a,b,c ; int x,y,z ; …… 题解列表 2024年01月18日 0 点赞 0 评论 118 浏览 评分:9.9
python-水仙花数-问题2 摘要:解题思路:从100到1000内的水仙花数注意事项:参考代码:num=100while(num<1000): g=int(num%10)#个位 s=int(num/10%10)#十位 …… 题解列表 2022年02月04日 0 点赞 0 评论 267 浏览 评分:9.9
C语言训练-"水仙花数"问题2-题解(C++代码) 摘要:```cpp #include using namespace std ; void f(int x) { int i = x % 10 ; int j = x % 100 / 10 …… 题解列表 2020年09月01日 0 点赞 0 评论 539 浏览 评分:9.9
C语言训练-"水仙花数"问题2-题解(Python代码) 摘要:解题思路:注意事项:参考代码:num=100 while num<1000: if num==int(str(num)[0])**3+int(str(num)[1])**3+int(str…… 题解列表 2020年11月18日 0 点赞 0 评论 642 浏览 评分:9.9
编写题解 1120: C语言训练-"水仙花数"问题2 摘要:C语言训练-"水仙花数"问题1https://blog.dotcpp.com/a/89516 ```c //水仙花数问题2 #include #include void IsDaffod…… 题解列表 2022年08月19日 0 点赞 0 评论 237 浏览 评分:9.9