developer-student-club-thapar / algo-book

The algo book that contains various algorithms in 4 different languages
https://algo-book.dsctiet.tech
GNU General Public License v3.0
16 stars 44 forks source link

armstrong.js added #70

Closed Yash7818 closed 4 years ago

Yash7818 commented 4 years ago

armstrong program in javascript is added

jsparmani commented 4 years ago

Please add a README.md for the algorithm by following the template in file ALGO_TEMPLATE_README.

Yash7818 commented 4 years ago

@jsparmani a readme.md is already added into it named armstrong.md by someone. The logic described there is exactly same that of mine but implemented in javascript.

DakshKK commented 4 years ago

A JS file already exists, if you are implementing a new version of the algorithm, will keep this PR open, else please close it. If there are any changes you want to make or recommend, follow our contribution guidelines while doing so.

An implementation in any other language is welcome.

Yash7818 commented 4 years ago

@DakshKK but my program is more general than that of the added one. My program can work for any n digit number but the program present there is only acceptable for 3 digit number.

DakshKK commented 4 years ago

@Yash7818 then do this. Please modify the code in the existing file, or make a commit which deletes the file, and adds your one, so there will only be a single file, and there are no clashes.

If both files are to be kept, refer to the contribution guidelines, and name your file in an incremental order, that is Armstrong2.js so that I can merge your PR.

Please squash your commits, so there is not an absurd number of them, you can refer to the guidelines as to how a commit is squashed.

Yash7818 commented 4 years ago

@DakshKK I will change the file name to armstrong2.js

DakshKK commented 4 years ago

Please do so.