题解 1016: [编程入门]水仙花数判断

来看看其他人写的题解吧!要先自己动手做才会有提高哦! 
返回题目 | 我来写题解

筛选

非正常解法但是很基础

摘要:解题思路:穷举a,循环求和,判断是否相等,输出。注意事项:参考代码:#include <iostream>using namespace std;int main(){    int a,b,c,su……

水仙花数判断

摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){    int a,b,c,n;    for(n=100;n<=999;n++)    {        a=n……

计算水仙花数

摘要:解题思路通过除法与取余将该三位数的每一位分离出来注意事项:参考代码:#include<stdio.h>int main(){    int a,b,c,all;    int n,i;    //sc……

最简单的思路,

摘要:解题思路:挨个计算,拆分注意事项:参考代码:#include <stdio.h>int main() { int i,j,k,n; for( n=100;n<1000;n++)//所有数字因为水仙花是……

[编程入门]水仙花数判断

摘要:解题思路:思考百位、十位、个位怎么表示注意事项:参考代码:#include<stdio.h>int main(){ int a,b,c,s,m=100; while(m<1000) { a=m/1……

水仙花数判断

摘要:参考代码:#include"bits/stdc++.h" using namespace std; int a[1111]; bool check(int z){ int q=0; in……

最简单的for循环问题

摘要:解题思路:利用for循环注意事项:%作为运算符是用来取余的,/是除法运算。参考代码:#include<stdio.h>int main(){    int i=100,a,b,c;    for(i=……

水仙花数判断(c++易懂)

摘要:解题思路:使用for循环遍历所有三位数,再使用if语句找出各位数字立方和等于自己本身的数。注意事项:看注释参考代码:#include <iostream>   using namespace std;……