编写题解 1119: C语言训练-"水仙花数"问题1 摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;int back(int a){ int b,c,d; b = a%10; …… 题解列表 2022年03月19日 0 点赞 0 评论 181 浏览 评分:0.0
个人认为比较直观 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int a,b,c,x; scanf("%d",&x); a=x/100; b=x/10…… 题解列表 2022年03月18日 0 点赞 0 评论 138 浏览 评分:0.0
C语言训练-"水仙花数"问题1 解答代码及思路 摘要:解题思路:定义一个数组变量来存储三位数,通过使用for循环和getchar()函数使a[0]、a[1]和a[2]分别以字符形式得到百位、十位和个位数的ASCII码,然后用每个数字都-48就可以得到十进…… 题解列表 2022年03月04日 0 点赞 0 评论 306 浏览 评分:0.0
C语言训练-"水仙花数"问题1 摘要:解题思路:定义一个变量,我们假设这个变量就是一个三位数,那么我们可以依次来求出它的百位数,十位数和个位数,因为我们要的只是位数上的一个数字,所以它们只能是整型,这样这道题就很简单了。注意事项:pow需…… 题解列表 2022年02月01日 0 点赞 0 评论 228 浏览 评分:0.0
Hifipsysta-1119题-C语言训练-"水仙花数"问题1(C++代码)字符串转换法很简单 摘要: ```cpp #include #include #include using namespace std; int main(){ string str; ge…… 题解列表 2022年01月30日 0 点赞 0 评论 182 浏览 评分:0.0
1119: C语言训练-"水仙花数"问题1(python解) 摘要:解题思路:将三位数拆分存入a,b,c进行计算注意事项:参考代码:n=int(input())a=n%10b=n//10%10c=n//100if(a**3+b**3+c**3==n): prin…… 题解列表 2022年01月28日 0 点赞 0 评论 215 浏览 评分:0.0
写题解 1119: C语言训练-"水仙花数"问题1 摘要:#include<stdio.h>int main(){ int num; scanf("%d",&num);int a, b, c; a = num % 10; //取个位的数字 b…… 题解列表 2022年01月25日 0 点赞 0 评论 196 浏览 评分:0.0
C语言训练-"水仙花数"问题1 摘要:解题思路:判断各位数的立方和与该数本身是否相等,相等输出1,不相等输出0;注意事项:无参考代码:#include<stdio.h>#include<string.h>int a,b,c,d;void …… 题解列表 2022年01月18日 0 点赞 0 评论 208 浏览 评分:0.0
三位数水仙花数求解 摘要:解题思路:注意事项:参考代码:#include <stdio.h>int main(){ int a,b,c,number; scanf("%d",&number); a=n…… 题解列表 2022年01月10日 0 点赞 2 评论 360 浏览 评分:9.9