新人求解 我这个水仙花计数哪里出了问题
public class Demo {public static void main(String[] args) {
int count = 0; //定义初始变量为0
for (int i = 100;i <= 999;i++) {
int ge = i % 10 ; //个位的值
int shi = (i / 10) % 100; //十位的值
int bai = i / 100 % 10; //百位的值
if (i == (ge*ge*ge + shi*shi*shi + bai*bai*bai))
{
count++;
System.out.println(i);
}
} System.out.println(count);
}
}