PROGRAMMING:Narcissistic Narcissus
Narcissistic number is the name given by mathematician Ma Daqi in 1966, also known as "self respecting number", "reduced number" or "super complete number invariant number". Tan Xiangbai gave him a nice name "narcissus number". The general definition is: the sum of the N powers of the numbers in an n-digit number is equal to the number itself. For example: 153 = 1 ^ 3 + 5 ^ 3 + 3 ^ 3, we want to know which numbers are Narcissus numbers< br/>
1. Define a tool class,
Class has a method isdafodil(), which can determine whether a 3-digit number given by the user is the number of daffodils and return true or false < br / >
public boolean isDaffodilf(int num)
2. Define the main class and complete two things in the main method: < br / >
(1) Enter a three digit number to determine whether the number is a narcissus number. If so, output yes, otherwise output No. if not, output error < br / >
(2) Output all the Narcissus numbers in all 3 digits, each number occupies one line
###Input format:
Input gives an integer on a line.
###Output format:
Output whether a number is narcissus number, and all 3-digit narcissus number
###Input example:
Here is a set of inputs. For example:
```in
two hundred and ninety-nine
```
```in
one hundred and fifty-three
```
```in
one thousand
```
###Output example:
The corresponding output is given here. For example:
```out
no
one hundred and fifty-three
three hundred and seventy
three hundred and seventy-one
four hundred and seven
```
```out
yes
one hundred and fifty-three
three hundred and seventy
three hundred and seventy-one
four hundred and seven
```
```out
error
one hundred and fifty-three
three hundred and seventy
three hundred and seventy-one
four hundred and seven
```
answer:If there is no answer, please comment
1. Define a tool class,
Class has a method isdafodil(), which can determine whether a 3-digit number given by the user is the number of daffodils and return true or false < br / >
public boolean isDaffodilf(int num)
2. Define the main class and complete two things in the main method: < br / >
(1) Enter a three digit number to determine whether the number is a narcissus number. If so, output yes, otherwise output No. if not, output error < br / >
(2) Output all the Narcissus numbers in all 3 digits, each number occupies one line
###Input format:
Input gives an integer on a line.
###Output format:
Output whether a number is narcissus number, and all 3-digit narcissus number
###Input example:
Here is a set of inputs. For example:
```in
two hundred and ninety-nine
```
```in
one hundred and fifty-three
```
```in
one thousand
```
###Output example:
The corresponding output is given here. For example:
```out
no
one hundred and fifty-three
three hundred and seventy
three hundred and seventy-one
four hundred and seven
```
```out
yes
one hundred and fifty-three
three hundred and seventy
three hundred and seventy-one
four hundred and seven
```
```out
error
one hundred and fifty-three
three hundred and seventy
three hundred and seventy-one
four hundred and seven
```
answer:If there is no answer, please comment