publicclassShuiXianHuaShu {publicstaticvoidmain(String[] args) {intx = 0;//定义水仙花数的个数for(inti=100;i<=999;i++){intb = i/100;//取得百位数ints = (i-100*b)/10;//取得十位数intg = (i-s*10-b*100);//取得个位数if(i==g*g*g+s*s*s+b*b*b){ x++;//每次符合水仙花...
publicclassShuiXianHuaShu {publicstaticvoidmain(String[] args) {intx = 0;//定义水仙花数的个数for(inti=100;i<=999;i++){intb = i/100;//取得百位数ints = (i-100*b)/10;//取得十位数intg = (i-s*10-b*100);//取得个位数if(i==g*g*g+s*s*s+b*b*b){ x++;//每次符合水仙花...