Click here to Skip to main content
15,892,059 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Find the sum and the product of this range of numbers: 2,4,8, 16... a) till the number 1000 b) no ending number (I'm not sure this point is correct) I solved the a point but I don't know if it is right. Is it correct?
http://codegolf.stackexchange.com/questions/50853/create-the-block-scheme-of-this-algorithm[^]
Posted
Updated 20-Oct-22 1:44am
Comments
CPallini 27-May-15 11:39am    
I see a pattern there...

1 solution

Try it.
Get out a pencil and paper, think of the ending number as 5 instead of 1000 to make it human readable and follow it through, using the paper and pencil to record what happens.

Do you get the right result? If so, then (a) is correct.
There is no (b)...so that isn't right!
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900