Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. Logic problem

Logic problem

Scheduled Pinned Locked Moved The Lounge
helpquestion
20 Posts 17 Posters 1 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Chris Maunder

    You have two hourglasses, one measures 7 minutes and the other measures 4 minutes, now you want to measure 9 minutes, how do you do it?

    J Offline
    J Offline
    Jon Newman
    wrote on last edited by
    #8

    Chris Maunder wrote: you want to measure 9 minutes, how do you do it? A watch...or that little clock in the bottom right of your screen. [edit]Now, can you stick your tongue out and touch your forhead?[/edit]


    "If you just say porn then you get all manner of chaff and low grade stuff."
    - Paul Watson, Lounge 25 Mar 03
    "If a man is standing in the middle of the forest speaking and there is no woman around to hear him, is he still wrong?"
    - Anon


    Jonathan 'nonny' Newman Homepage [www.nonny.com] [^]

    S P 2 Replies Last reply
    0
    • C Chris Maunder

      You have two hourglasses, one measures 7 minutes and the other measures 4 minutes, now you want to measure 9 minutes, how do you do it?

      M Offline
      M Offline
      Marc Clifton
      wrote on last edited by
      #9

      I don't do your homework problems! :-D Marc Help! I'm an AI running around in someone's f*cked up universe simulator.
      Sensitivity and ethnic diversity means celebrating difference, not hiding from it. - Christian Graus
      Every line of code is a liability - Taka Muraoka
      Microsoft deliberately adds arbitrary layers of complexity to make it difficult to deliver Windows features on non-Windows platforms--Microsoft's "Halloween files"

      1 Reply Last reply
      0
      • C Chris Maunder

        You have two hourglasses, one measures 7 minutes and the other measures 4 minutes, now you want to measure 9 minutes, how do you do it?

        D Offline
        D Offline
        Daniel Turini
        wrote on last edited by
        #10

        Hehehe... Lots of free time and hourglass rolling on your screen... My latest article: GBVB - Converting VB.NET code to C#

        J 1 Reply Last reply
        0
        • C Chris Maunder

          You have two hourglasses, one measures 7 minutes and the other measures 4 minutes, now you want to measure 9 minutes, how do you do it?

          J Offline
          J Offline
          jhaga
          wrote on last edited by
          #11

          HG 7 you let go to end and turn it around. HG 4 turn at 4 min and at 8 min At 8 min you turn HG 7 again and let it run out = 9 min !! jhaga

          1 Reply Last reply
          0
          • C Chris Maunder

            You have two hourglasses, one measures 7 minutes and the other measures 4 minutes, now you want to measure 9 minutes, how do you do it?

            J Offline
            J Offline
            JoeSox
            wrote on last edited by
            #12

            go buy a 9 minute hourglass. :-D :jig::jig::jig: <that's logical.> Later,
            JoeSox
            www.humanaiproject.org "This life is more than just a read thru"[lyrics^] Can't Stop - Red Hot Chili Peppers

            1 Reply Last reply
            0
            • J Jon Newman

              Chris Maunder wrote: you want to measure 9 minutes, how do you do it? A watch...or that little clock in the bottom right of your screen. [edit]Now, can you stick your tongue out and touch your forhead?[/edit]


              "If you just say porn then you get all manner of chaff and low grade stuff."
              - Paul Watson, Lounge 25 Mar 03
              "If a man is standing in the middle of the forest speaking and there is no woman around to hear him, is he still wrong?"
              - Anon


              Jonathan 'nonny' Newman Homepage [www.nonny.com] [^]

              S Offline
              S Offline
              Steve Mayfield
              wrote on last edited by
              #13

              Now, can you stick your tongue out and touch your forhead?

              I can't - but Heidi Hamilton can - "a beautiful, blonde bomb shell with an 8-inch tongue". She is a Los Angeles radio "on air personality". Recently had a tongue-off with Kiss's Gene Simmons and won...here is the competition[^] Steve

              J 1 Reply Last reply
              0
              • C Chris Maunder

                You have two hourglasses, one measures 7 minutes and the other measures 4 minutes, now you want to measure 9 minutes, how do you do it?

                N Offline
                N Offline
                Nick Parker
                wrote on last edited by
                #14

                Chris Maunder wrote: You have two hourglasses, one measures 7 minutes and the other measures 4 minutes, now you want to measure 9 minutes, how do you do it? Flip the 4 minute hourglass. When the 4 minute hourglass is halfway down, flip the 7 minute hourglass. Did I miss a better solution? -Nick Parker

                J 1 Reply Last reply
                0
                • N Nick Parker

                  Chris Maunder wrote: You have two hourglasses, one measures 7 minutes and the other measures 4 minutes, now you want to measure 9 minutes, how do you do it? Flip the 4 minute hourglass. When the 4 minute hourglass is halfway down, flip the 7 minute hourglass. Did I miss a better solution? -Nick Parker

                  J Offline
                  J Offline
                  jhaga
                  wrote on last edited by
                  #15

                  Measuring a 4 minute hourglass halfway down will give you an accuracy of +-10 sek. If you let it run to the end, it gives an accuracy of +-5 sek. (hourglass standardisation rfc-474) jhaga

                  1 Reply Last reply
                  0
                  • S Steve Mayfield

                    Now, can you stick your tongue out and touch your forhead?

                    I can't - but Heidi Hamilton can - "a beautiful, blonde bomb shell with an 8-inch tongue". She is a Los Angeles radio "on air personality". Recently had a tongue-off with Kiss's Gene Simmons and won...here is the competition[^] Steve

                    J Offline
                    J Offline
                    Jon Newman
                    wrote on last edited by
                    #16

                    :omg::wtf::omg: I'll have to think twice before making that joke again


                    "If you just say porn then you get all manner of chaff and low grade stuff."
                    - Paul Watson, Lounge 25 Mar 03
                    "If a man is standing in the middle of the forest speaking and there is no woman around to hear him, is he still wrong?"
                    - Anon


                    Jonathan 'nonny' Newman Homepage [www.nonny.com] [^]

                    1 Reply Last reply
                    0
                    • D Daniel Turini

                      Hehehe... Lots of free time and hourglass rolling on your screen... My latest article: GBVB - Converting VB.NET code to C#

                      J Offline
                      J Offline
                      John Honan
                      wrote on last edited by
                      #17

                      Nice article Daniel, although your link didn't work, I found it here: http://www.codeproject.com/csharp/GBVB.asp[^] I'm a VB.NET programmer, what I'd really like to see is a conversion / comparison chart of VB.NET versus C# I often find nice examples of things I need to do, but the code is in C#, and I have difficulty converting it to VB.NET! Things like, where to put the 'inherits' keyword, how to declare constructors, how 'namespace' is used in VB.NET, the structure of classes in VB.NET versus C#, how to declare functions/subs and parameters/return values in C# versus VB.NET I always get caught out by the 'reverse' way of declaring types in VB versus C++, e.g. in VB.NET you can say Dim myStr as String, in C# it's something like String myStr; (the other way around!) Okay, that's enough... I don't want to start a programming thread in the Lounge!... :-O John. www.silveronion.com[^]

                      J 1 Reply Last reply
                      0
                      • J John Honan

                        Nice article Daniel, although your link didn't work, I found it here: http://www.codeproject.com/csharp/GBVB.asp[^] I'm a VB.NET programmer, what I'd really like to see is a conversion / comparison chart of VB.NET versus C# I often find nice examples of things I need to do, but the code is in C#, and I have difficulty converting it to VB.NET! Things like, where to put the 'inherits' keyword, how to declare constructors, how 'namespace' is used in VB.NET, the structure of classes in VB.NET versus C#, how to declare functions/subs and parameters/return values in C# versus VB.NET I always get caught out by the 'reverse' way of declaring types in VB versus C++, e.g. in VB.NET you can say Dim myStr as String, in C# it's something like String myStr; (the other way around!) Okay, that's enough... I don't want to start a programming thread in the Lounge!... :-O John. www.silveronion.com[^]

                        J Offline
                        J Offline
                        Jon Newman
                        wrote on last edited by
                        #18

                        John Honan wrote: in VB.NET you can say Dim myStr as String, in C# it's something like String myStr; Thats C++ based languages for you.* No silly keywords found here. *No lets not get into a discussion about what C++ is based on


                        "If you just say porn then you get all manner of chaff and low grade stuff."
                        - Paul Watson, Lounge 25 Mar 03
                        "If a man is standing in the middle of the forest speaking and there is no woman around to hear him, is he still wrong?"
                        - Anon


                        Jonathan 'nonny' Newman Homepage [www.nonny.com] [^]

                        1 Reply Last reply
                        0
                        • C Chris Maunder

                          You have two hourglasses, one measures 7 minutes and the other measures 4 minutes, now you want to measure 9 minutes, how do you do it?

                          L Offline
                          L Offline
                          Lost User
                          wrote on last edited by
                          #19

                          Get 7 min and 4 min hourglass going. When the 4 min hourglass has ran out flip it over (we marked 4 min). When the 7 min hourglass has ran out flip over the 7 min hourglass (we no have a 7 min mark). Bear in mind that the 4 min hourglass will still run for another 1 min. When the 4 min hour glass has finnally run out flip 7 min hour glass at this instant (we marked 8 min). At this point the 7 min hourglass has only run for 1 min and by flipping it over again we will have it run out in exactly 1 min. Hence, the 8 + 1 = 9 min. Problem solved. Happy Coding :) Marat Kagetsya dogd' nashinaetsya :)

                          1 Reply Last reply
                          0
                          • J Jon Newman

                            Chris Maunder wrote: you want to measure 9 minutes, how do you do it? A watch...or that little clock in the bottom right of your screen. [edit]Now, can you stick your tongue out and touch your forhead?[/edit]


                            "If you just say porn then you get all manner of chaff and low grade stuff."
                            - Paul Watson, Lounge 25 Mar 03
                            "If a man is standing in the middle of the forest speaking and there is no woman around to hear him, is he still wrong?"
                            - Anon


                            Jonathan 'nonny' Newman Homepage [www.nonny.com] [^]

                            P Offline
                            P Offline
                            Peter Hancock
                            wrote on last edited by
                            #20

                            Sure.... what do you want me to touch my forehead with? My left hand, or my right hand?:-D And they still ran faster and faster and faster, till they all just melted away, and there was nothing left but a great big pool of melted butter "I ask candidates to create an object model of a chicken." -Bruce Eckel

                            1 Reply Last reply
                            0
                            Reply
                            • Reply as topic
                            Log in to reply
                            • Oldest to Newest
                            • Newest to Oldest
                            • Most Votes


                            • Login

                            • Don't have an account? Register

                            • Login or register to search.
                            • First post
                              Last post
                            0
                            • Categories
                            • Recent
                            • Tags
                            • Popular
                            • World
                            • Users
                            • Groups