+ 3

Are you up for a challenge.

Write a progam that reduces a number to a single character. For example, if you input 138, 1 * 3 * 8 = 24 2 * 4 = 8 Then when when you get only one character in the end and stop. https://code.sololearn.com/c5N3RF3InBgR/?ref=app

9th Aug 2017, 8:52 PM
Yonatan Dawit
Yonatan Dawit - avatar
1 Odpowiedź
+ 2
Here's the best I could do in a rush. https://code.sololearn.com/chkxqihOgJsK/?ref=app (I couldn't figure out how to make the "n*n" extend for numbers with more than two digits so if anyone could help me out there)
9th Aug 2017, 10:24 PM
MemeSenpai
MemeSenpai - avatar