package sxh;

public class test
{
 public static void main(String[] args)
 {

 for (int t=100;t<=999;t++)
 { int a=t/100,b=(t%100)/10,c=(t%100)%10;
 if (t==a*a*a+b*b*b+c*c*c)
 {
 System.out.println(t);

 } 

 }
 }
} 

运行结果
java打印100-999之间的水仙花数

相关文章:

  • 2021-07-22
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-21
  • 2021-12-27
  • 2021-05-25
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-27
  • 2021-07-25
相关资源
相似解决方案