I’m 196! #WSQ08

Honestly, this task was very difficult for me. It consisted in making a program that, from a range of numbers, found if there are any lychrel numbers, but what is a lychrel number? It is a number that cannot form a palindrome (a number that remains the same when digits are reversed). So, for this assigment I get some help of a friend and this tutorial (I’m really surprised on how can he do all that). First, we needed to add the library «BigInteger» because the numbers analyzed could be very big, and the string library. Then we have a bool function and a BigInteger function and then the magic happens in the main… Here is my code:

Lychrelnum

Original feature image recovered from: https://www.flickr.com/photos/taroonga/6896524010/in/photolist-bvqujo-xQuxa-aF5nYH-Uw4b41-iDQp9z-pFdaLR-b4M8Cx-bV1khG-6N1rYX-bUZTRU-dWyaEP-QCter9-hkDwhv-7XsDkr-UmQn6v-RY73X5-56zXgt-iS7egX-SPkkqW-qhBU78-T5tEsE-p3MrMm-bRJnAM-ffAoMV-hm9LWc-5orAzQ-awug4Q-bVqetb-Tb5hLo-2hJCg6-3UzXQF-97V3Bu-cxbiqj-hNar1U-96xSqA-7q97aB-dLd6iL-8ckgXa-e8Urw5-ba3RaR-edygKp-ndAb1M-bpdS9b-q3K1wh-RBrGT1-SbfwsX-itwSVL-fbUUaC-QRvaEQ-5AkR6z


Deja un comentario