Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Code Challenge: Snacky Friends, a donkey, and Apples
#21
Quote:See if this holds up. These guys may eat a few less than you think:

Testing 51

51 / 3 = 17 R 0 fail need Remainder 1 to give to Donkey

'52 / 3 = 17 R 1 52 - 17 - 1 = 34

'34 / 3 = 11 R 1 34 - 11 - 1 = 22

'22 / 3 = 7 R 1 so 7 for each

'26 + 7 = 33 1st
'17 + 7 = 24 2nd
'11 + 7 = 18 3rd
' +4 Donkey
====================
= 79 It works alright

(08-05-2024, 04:29 PM)Pete Wrote: When I need answers to difficult programming approaches, I consult Clippy... then do the opposite. Works every time! Clippy, the Anti-Maze.

Pete Big Grin

This reminds me of Seinfeld when George started succeeding in Life by doing the opposite of his first instinct.
b = b + ...
Reply


Messages In This Thread
RE: Code Challenge: Snacky Friends, a donkey, and Apples - by bplus - 08-05-2024, 04:58 PM



Users browsing this thread: 12 Guest(s)