通州建材批发李哥的博客水仙花数(Narcissistic mumber)也被称为超完全数字不变数、...本文使用Java语言中的while 循环来打印所有的水仙花数。 public class NarcissisticNumber { public static void main(String[] args) { int n = 100;
though the night的博客所谓水仙花数,是指一个三位数abc,如果满足a^3+b^3+c^3=abc... // while 循环 求水仙花数 int n; n = 100; while(n <999) { int a = n / 100; //求百位 int b = n % 100 /10;//求十位 int c = n