https://github.com/dbc2201/armstrongchecker
https://github.com/dbc2201/armstrongchecker
Last synced: 9 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/dbc2201/armstrongchecker
- Owner: dbc2201
- Created: 2022-06-27T17:01:43.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2022-06-27T17:01:47.000Z (about 4 years ago)
- Last Synced: 2025-04-06T02:32:40.321Z (about 1 year ago)
- Language: Java
- Size: 7.81 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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)