addition problem

This is a discussion on addition problem within the A Brief History of Cprogramming.com forums, part of the Community Boards category; Mooch, Earl and Shtinky all went to get a room in a hotel for a night. The owner said the ...

  1. #1
    ... kermit's Avatar
    Join Date
    Jan 2003
    Posts
    1,528

    addition problem

    Mooch, Earl and Shtinky all went to get a room in a hotel for a night. The owner said the room would be 30 dollars. If they split it evenly they each paid 10 dollars. After they had been in the room for awhile the bar maid came up and told them they had overpaid, the room was only 25 dollars. Since she couldn't split the 5 dollars evenly, she gave them each back a dollar and kept two dollars for a tip. Now they each have paid 9 dollars. So if they each paid 9 dollars, they paid 27 total (9+9+9) add the two dollars the bar maid kept and that only makes 29 dollars. Where is the missing dollar?

    ~/

  2. #2
    Registered User axon's Avatar
    Join Date
    Feb 2003
    Posts
    2,572
    you're kidding, right?

    some entropy with that sink? entropysink.com

    there are two cardinal sins from which all others spring: Impatience and Laziness. - franz kafka

  3. #3
    ... kermit's Avatar
    Join Date
    Jan 2003
    Posts
    1,528
    Why am I kidding? I've never seen anyone with an answer to it.

  4. #4
    Registered User axon's Avatar
    Join Date
    Feb 2003
    Posts
    2,572
    its all about the wording of the question... if you say that together the room cost 25, and each got a buck back you get: 25 + 3 = 28, so each paid 9.33, and not 9.

    I think the question is stupid, and it is a play on words...the logic is wrong.

    some entropy with that sink? entropysink.com

    there are two cardinal sins from which all others spring: Impatience and Laziness. - franz kafka

  5. #5
    Pursuing knowledge confuted's Avatar
    Join Date
    Jun 2002
    Posts
    1,916
    Gotta pay attention to order of operations.

    There is $25 in the register. $2 in the maid's pocket. $3 with the men. 25+2+3=30; no money is missing. Q.E.D.
    Away.

  6. #6
    Senior Member joshdick's Avatar
    Join Date
    Nov 2002
    Location
    Phildelphia, PA
    Posts
    1,146
    This puzzle is overdone.
    And this isn't a one liner.
    FAQ

    "The computer programmer is a creator of universes for which he alone is responsible. Universes of virtually unlimited complexity can be created in the form of computer programs." -- Joseph Weizenbaum.

    "If you cannot grok the overall structure of a program while taking a shower, you are not ready to code it." -- Richard Pattis.

  7. #7
    It's full of stars adrianxw's Avatar
    Join Date
    Aug 2001
    Posts
    4,831
    >>> Why am I kidding? I've never seen anyone with an answer to it.

    Someone posts this "paradox" about every 3-4 months on this very board, always gets answered. Try searching, however, it might not be easy to find the right keywords - I can't be bothered.
    Wave upon wave of demented avengers march cheerfully out of obscurity unto the dream.

  8. #8
    ... kermit's Avatar
    Join Date
    Jan 2003
    Posts
    1,528
    heh, should have figured it has been posted a lot on this board. Still, a clever problem nonetheless, and there are some gay answers to it on the net.

  9. #9
    ... kermit's Avatar
    Join Date
    Jan 2003
    Posts
    1,528
    Quote:

    Gotta pay attention to order of operations.

    There is $25 in the register. $2 in the maid's pocket. $3 wit
    Ok that is not the problem. It's when you look at it the other way around. They each paid 9 the maid had 2...then it doesn't add up.

    its all about the wording of the question... if you say that together the room cost 25, and each got a buck back you get: 25 + 3 = 28, so each paid 9.33, and not 9.
    How could they each pay 9.33 when they each got A DOLLAR back.

  10. #10
    ... kermit's Avatar
    Join Date
    Jan 2003
    Posts
    1,528
    When you are adding everything up, part of the money already paid went to the maid, therefore you don't add it at the end.

    Each person paid 9 dollars to make 27 but two of those went to the maid, therefore the room cost 25 and there is no missing money.
    Last edited by kermit; 10-06-2003 at 07:51 AM.

  11. #11
    Registered User axon's Avatar
    Join Date
    Feb 2003
    Posts
    2,572
    give it up kermit, please

    some entropy with that sink? entropysink.com

    there are two cardinal sins from which all others spring: Impatience and Laziness. - franz kafka

  12. #12
    Pursuing knowledge confuted's Avatar
    Join Date
    Jun 2002
    Posts
    1,916
    Kermit said:
    Where is the missing dollar?
    Gotta pay attention to order of operations.

    There is $25 in the register. $2 in the maid's pocket. $3 with the men. 25+2+3=30; no money is missing. Q.E.D.
    Ok that is not the problem.
    Yes it was. You might want to read your problem again.
    Away.

  13. #13
    Confused Magos's Avatar
    Join Date
    Sep 2001
    Location
    Sweden
    Posts
    3,145
    1) They each payed 10$

    2) The maid gave each 1$ back, everyone now payed 9$

    3) Together they payed 9 * 3 = 27 = 25 + 2 = room cost + 2$ tip
    MagosX.com

    Give a man a fish and you feed him for a day.
    Teach a man to fish and you feed him for a lifetime.

  14. #14
    ... kermit's Avatar
    Join Date
    Jan 2003
    Posts
    1,528
    Originally posted by axon
    give it up kermit, please
    Axon, you demonstrated no ability to answer the problem correctly. However, you get two points for trying....

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Someone having same problem with Code Block?
    By ofayto in forum C++ Programming
    Replies: 1
    Last Post: 07-12-2007, 08:38 AM
  2. A question related to strcmp
    By meili100 in forum C++ Programming
    Replies: 6
    Last Post: 07-07-2007, 02:51 PM
  3. WS_POPUP, continuation of old problem
    By blurrymadness in forum Windows Programming
    Replies: 1
    Last Post: 04-20-2007, 06:54 PM
  4. String Addition Problem...
    By Comrade_Yeti in forum C++ Programming
    Replies: 16
    Last Post: 01-15-2007, 03:01 PM
  5. Laptop Problem
    By Boomba in forum Tech Board
    Replies: 1
    Last Post: 03-07-2006, 05:24 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21