Use java to find all the "Narcissus numbers" within 1000. The so-called "narcissus number" refers to a three digit number whose cubic sum of each digit is equal to the number itself

Use java to find all the "Narcissus numbers" within 1000. The so-called "narcissus number" refers to a three digit number whose cubic sum of each digit is equal to the number itself


package com.cn.liu .test;
public class shuixianhua {
 / * * find the number of daffodils
 * Liu
 * @param args
 */
public static void main(String[] args) {
for(int a=100;a



VF programming: input a three digit number to judge whether it is a narcissus number (the so-called narcissus number refers to the sum of the cubes of each digit is equal to the number itself)


The number of Narcissus should be 100 to 999
set talk off
clear
for I=100 to 999
a=int(i/100)
b=int((i-100*a)/10)
c=i-int(i/10)*10
if i=a^3+b^3+c^3
?i
endif
set talk on
return



The number of daffodils written in Java refers to the number of its digits. The cube of three digits is equal to the three digits itself. Calculate all the number of daffodils


public class Fun {
public static void main(String[] args) {
for(int i=1;i