Write a JavaScript program to find the Armstrong number of 3 digits. note: An Armstrong number of three digits is an integer such that the sum of the cubes of its digits is equal to the number itself. For example, 371 is an Armstrong number since 3**3 + 7**3 + 1**3 = 371.
Answers
Answered by
0
Answer:
I hope it will help you
Explanation:
3+7+3+a=13+a should be divisible by 9.
⇒ a = 5
473b is divisible by 11.
⇒ 4 + 3 - 7 - b = 0 or 11
⇒ b = 0 or 11
∴ b = 0
371c is divisible by 6.
⇒ 371c is divisible by both 2 and 3.
⇒ c is an even number and 3 + 7 + 1 + c is divisible by 3.
⇒ c = 0, 2, 4, 6, 8 and 11 + c is divisible by 3.
⇒ c = 4
∴ a + b + c = 5 + 0 + 4 = 9
Similar questions