# Answer to Question #63959 in MatLAB | Mathematica | MathCAD | Maple for Jack

Question #63959

Create a function file called narcissisticNumbers.m.

Using for loop(s) or while loop(s), write a function narcissisticNumbers that returns all the narcissistic

numbers between 300 and 399 (there should be two).

a number n is called narcissistic if it satisfies the condition

n = dk

k + dk-1

k + ... + d2

k + d1

k.

For example the 3-digit decimal number 153 is a narcissistic number because 153 = 13 + 53 + 33

Hint: 1) use a nested loop for all possible combinations of digits, or 2) use mod and fix/floor

functions.

Using for loop(s) or while loop(s), write a function narcissisticNumbers that returns all the narcissistic

numbers between 300 and 399 (there should be two).

a number n is called narcissistic if it satisfies the condition

n = dk

k + dk-1

k + ... + d2

k + d1

k.

For example the 3-digit decimal number 153 is a narcissistic number because 153 = 13 + 53 + 33

Hint: 1) use a nested loop for all possible combinations of digits, or 2) use mod and fix/floor

functions.

Expert's answer

#### Not answered

Need a fast expert's response?

Submit orderand get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

## Comments

## Leave a comment