The case of the missing dollar
Three guys are checking into a hotel in Vegas. The sign says $30, so they each dig a $10 out of their pockets and hand it to the hotel receptionist, who tells them that actually, today the room is on special for $25. He gives the guys five single dollar bills and the bell boy grabs their bags and shows them to the room. They figure with a $25 dollar room, they can get away with a two dollar tip, and so they hand the bell boy $2, they split the remaining three dollars and settle into their room.
Originally, they each spent $10.
They each got $1 back, so the three of them ended up spending $9 each while the bell boy walked away with $2.
But wait a minute, $9 times 3 is $27, and the bell boy got $2 . . .
What happened to the missing dollar???
Yes its old, there isn't a dollar missing.
There isn't a missing dollar. No money is removed from the system. Just look at the state diagram.
Code:
Men Hotel Bell Boy Total
---------------------------------
Start +30 0 0 30
0 +30 0 30
+5 +25 0 30
+3 +25 +2 30
---------------------------------
Change from start -27 +25 +2 0