Skip to content

xvyashar/js-palindrome

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Palindrome Math Challenge

It's a simple & fun math challenge. This small JS script will take a number from input, then add its reversed to it and will repeat this step till gets a palindrome as result (a number that is same with its reversed version. like: 1771)

example: 568(input) + 865(reversed input) = 1271 --> 1271 + 1721 = 2992(palindrome)

How to Use

  • clone: git clone https://github.com/xvyashar/js-palindrome.git
  • install dependencies: npm install
  • run: node index.js <input_number>

Fun Fact:

If you test some special numbers like 196 & 295 as input, you'll never reach to palindrome :)

Test them to see!

About

Palindrom Math Challenge

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published