[PHP] Add all previous numbers in a for loop
#7

Quote:
Originally Posted by Mr.Anonymous
Посмотреть сообщение
It's actually not multiplied by 2, it's add all previous numbers on each loop.
If you add all the previous numbers on each loop, the result you get is the same as the result you get, if you start from 3 and multiply from there. The code I provided produces the same result, as the one you've described.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)