An open API service indexing awesome lists of open source software.

https://github.com/dbc2201/armstrongchecker


https://github.com/dbc2201/armstrongchecker

Last synced: 9 months ago
JSON representation

Awesome Lists containing this project

README

          

# Armstrong Numbers (Narcissistic Numbers)

## Java Programming Course

---

**Course 1**: Problem-Solving and Computational Thinking in Java

**Sprint 5**: Working with Looping Constructs

---

Problem Statement
---

Write a program in Java that checks whether a given number is an Armstrong number.
An Armstrong number is a number that is equal to the sum of the cubes of its digits.
For example, the number **153** is an Armstrong number because:

```math
153 = 1^3 + 5^3 + 3^3
```

---

Task
---

1. Open the [source code file](src/main/java/io/github/dbc/ArmstrongChecker.java) and complete the code.
2. Open the [test case file](src/test/java/io/github/dbc/ArmstrongCheckerTest.java) and run the test cases to
check your code.

---

Fun Resource
---

1. [153 and Narcissistic Numbers - Numberphile](https://youtu.be/4aMtJ-V26Z4)
2. [Numbers that love themselves #shorts - Vsauce2](https://youtube.com/shorts/dUnlSy6LGq4?feature=share)