
简介
该用户还未填写简介
擅长的技术栈
可提供的服务
暂无可提供的服务
打印所有“水仙花数”所谓“水仙花数”,是指一个三位数,其各位数字立方和等于该数本身。例如,153是一个水仙花数,因为153=1的立方+ 5的立方+ 3的立方。方法一:使用do…while语句#include <stdio.h>#include <math.h>int main(int argc,char **argv){int num=100,a,b,c;do{//首先将三
一、方法一#include <stdio.h>#define P 5//数组元素的个数int main(){int i,max1,max2=0;//定义一个最大值和一个最小值int tab[P];//定义一个数组for(i=0;i<P;i++)//输入数组的元素scanf("%d",&tab[i]);max1=tab[0];//初始化:将数组中的元素值赋给最大值for(i
打印所有“水仙花数”所谓“水仙花数”,是指一个三位数,其各位数字立方和等于该数本身。例如,153是一个水仙花数,因为153=1的立方+ 5的立方+ 3的立方。方法一:使用do…while语句#include <stdio.h>#include <math.h>int main(int argc,char **argv){int num=100,a,b,c;do{//首先将三
打印所有“水仙花数”所谓“水仙花数”,是指一个三位数,其各位数字立方和等于该数本身。例如,153是一个水仙花数,因为153=1的立方+ 5的立方+ 3的立方。方法一:使用do…while语句#include <stdio.h>#include <math.h>int main(int argc,char **argv){int num=100,a,b,c;do{//首先将三







