Thread:King Dragonhoff/@comment-7964552-20160507015949/@comment-7964552-20160507075818

King Dragonhoff wrote: How silly of me. I knew that. I guess I just used the formula in the other thread without thinking. I'll work on the calculator some more tomorrow. You can make it in 2 ways:

1. An array of all the values and a cycle that sum the values untill it reaches the requested number

2. A cycle that computes the previous formula untill it reaches the requested number

I don't know wich is more efficient (I think the second one because it dosen't need to store anything). I can make a raw algorithm if you want =D