Skip to content

paulikas78/armstrong

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 

Repository files navigation

Armstrong Numbers

An Armstrong Number is an N-digit number that is equal to the sum of the Nth powers of its digits.

An example is all single digit numbers. Take 5 for example. 5 is a single digit and 5^1 is equal to 5, therefore it is an Armstrong number.

5 = 5^1
5 = 5

Another example is 371. 371 is three digits. 3^3 + 7^3 + 1^3 is 27 + 343 + 1, which added together is 371. Thus 371 is an Armstrong number.

371 = 3^3 + 7^3 + 1^3
371 = 27 + 343 + 1
371 = 371

Release 0

Write a program in Python and Javascript to find all Armstrong numbers in the range of 0 and 999.

Don't forget to run the tests!

Release 1: Refactor

Review your code, How can you make this more scalable and reusable later?

Stretch Yourself

  • Can you think of any more tests for your program?

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 60.1%
  • Python 39.9%