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. Other Discussions
  3. The Back Room
  4. Just For Fun.......

Just For Fun.......

Scheduled Pinned Locked Moved The Back Room
c++helpquestion
25 Posts 13 Posters 0 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.
  • B brianwelsch

    Cut once in the middle. (1) Place one half on top of the other. Cut off one section length from the end. (2) Cut long boards in half. (3) Stack boards again and cut in the middle. (4) You'll have 10 pieces in 4 minutes, though cutting 4 boards at once would require some nice equipment. BW


    If you're not part of the solution, you're part of the precipitate.
    -- Steven Wright

    -- modified at 13:35 Monday 26th June, 2006

    H Offline
    H Offline
    hackC
    wrote on last edited by
    #12

    ok, yeah you would need a massive saw or something.... "C++ will solve any problem."

    1 Reply Last reply
    0
    • R Red Stateler

      I missed one question on the Math portion of my SATs many years ago and it was that same question (actually it was how long a fence could be built with x number of posts). It killed my perfect score. :(

      N Offline
      N Offline
      Nish Nishant
      wrote on last edited by
      #13

      espeir wrote:

      how long a fence could be built with x number of posts

      No of posts * diameter of 1 post? Regards, Nish


      Nish’s thoughts on MFC, C++/CLI and .NET (my blog)
      Currently working on C++/CLI in Action for Manning Publications. Also visit the Ultimate Toolbox blog (New)

      D 1 Reply Last reply
      0
      • N Nish Nishant

        espeir wrote:

        how long a fence could be built with x number of posts

        No of posts * diameter of 1 post? Regards, Nish


        Nish’s thoughts on MFC, C++/CLI and .NET (my blog)
        Currently working on C++/CLI in Action for Manning Publications. Also visit the Ultimate Toolbox blog (New)

        D Offline
        D Offline
        Dan Neely
        wrote on last edited by
        #14

        No. The setup for that type of question is: "you have X posts, that need to be spaced D distance apart (for the cross peices). How long of a strait fence can you make?" The common wrong anser is X*d. The correct answer is (X-1)*D. If you're confused about why, set X = 2, and draw the fence |-|. This's why an off by one error is also called a fencepost error.

        N J 2 Replies Last reply
        0
        • D Dan Neely

          No. The setup for that type of question is: "you have X posts, that need to be spaced D distance apart (for the cross peices). How long of a strait fence can you make?" The common wrong anser is X*d. The correct answer is (X-1)*D. If you're confused about why, set X = 2, and draw the fence |-|. This's why an off by one error is also called a fencepost error.

          N Offline
          N Offline
          Nish Nishant
          wrote on last edited by
          #15

          dan neely wrote:

          No. The setup for that type of question is: "you have X posts, that need to be spaced D distance apart (for the cross peices). How long of a strait fence can you make?" The common wrong anser is X*d. The correct answer is (X-1)*D. If you're confused about why, set X = 2, and draw the fence |-|. This's why an off by one error is also called a fencepost error.

          Yep, that's when there is spacing. If you assume no spacing, and that the posts are fixed into the ground - it's n * diameter. That's how I mentally pictured a fence :-) Regards, Nish


          Nish’s thoughts on MFC, C++/CLI and .NET (my blog)
          Currently working on C++/CLI in Action for Manning Publications. Also visit the Ultimate Toolbox blog (New)

          D S 2 Replies Last reply
          0
          • N Nish Nishant

            dan neely wrote:

            No. The setup for that type of question is: "you have X posts, that need to be spaced D distance apart (for the cross peices). How long of a strait fence can you make?" The common wrong anser is X*d. The correct answer is (X-1)*D. If you're confused about why, set X = 2, and draw the fence |-|. This's why an off by one error is also called a fencepost error.

            Yep, that's when there is spacing. If you assume no spacing, and that the posts are fixed into the ground - it's n * diameter. That's how I mentally pictured a fence :-) Regards, Nish


            Nish’s thoughts on MFC, C++/CLI and .NET (my blog)
            Currently working on C++/CLI in Action for Manning Publications. Also visit the Ultimate Toolbox blog (New)

            D Offline
            D Offline
            Dan Neely
            wrote on last edited by
            #16

            Nishant Sivakumar wrote:

            Yep, that's when there is spacing. If you assume no spacing, and that the posts are fixed into the ground - it's n * diameter. That's how I mentally pictured a fence

            You'd've gotten it wrong on the test then. :)

            N 1 Reply Last reply
            0
            • D Dan Neely

              Nishant Sivakumar wrote:

              Yep, that's when there is spacing. If you assume no spacing, and that the posts are fixed into the ground - it's n * diameter. That's how I mentally pictured a fence

              You'd've gotten it wrong on the test then. :)

              N Offline
              N Offline
              Nish Nishant
              wrote on last edited by
              #17

              dan neely wrote:

              You'd've gotten it wrong on the test then.

              Nope, when I read the "spaced" part of the question, I'd know that fences are not made the same way in all parts of the world :-) Regards, Nish


              Nish’s thoughts on MFC, C++/CLI and .NET (my blog)
              Currently working on C++/CLI in Action for Manning Publications. Also visit the Ultimate Toolbox blog (New)

              1 Reply Last reply
              0
              • N Nish Nishant

                dan neely wrote:

                No. The setup for that type of question is: "you have X posts, that need to be spaced D distance apart (for the cross peices). How long of a strait fence can you make?" The common wrong anser is X*d. The correct answer is (X-1)*D. If you're confused about why, set X = 2, and draw the fence |-|. This's why an off by one error is also called a fencepost error.

                Yep, that's when there is spacing. If you assume no spacing, and that the posts are fixed into the ground - it's n * diameter. That's how I mentally pictured a fence :-) Regards, Nish


                Nish’s thoughts on MFC, C++/CLI and .NET (my blog)
                Currently working on C++/CLI in Action for Manning Publications. Also visit the Ultimate Toolbox blog (New)

                S Offline
                S Offline
                Shog9 0
                wrote on last edited by
                #18

                Nishant Sivakumar wrote:

                That's how I mentally pictured a fence :)

                A fence made entirely of posts? Yeah, i could see that... but it'd get real pricey (unless you were building it in the middle of a heavily wooded area and could just cut your own posts as-needed). Have you seen many of these?

                ---- Scripts i’ve known... CPhog 1.0.0.0 - make CP better. Forum Bookmark 0.2.5 - bookmark forum posts on Pensieve Print forum 0.1.2 - printer-friendly forums Expand all 1.0 - Expand all messages In-place Delete 1.0 - AJAX-style post delete Syntax 0.1 - Syntax highlighting for code blocks in the forums

                N J 2 Replies Last reply
                0
                • S Shog9 0

                  Nishant Sivakumar wrote:

                  That's how I mentally pictured a fence :)

                  A fence made entirely of posts? Yeah, i could see that... but it'd get real pricey (unless you were building it in the middle of a heavily wooded area and could just cut your own posts as-needed). Have you seen many of these?

                  ---- Scripts i’ve known... CPhog 1.0.0.0 - make CP better. Forum Bookmark 0.2.5 - bookmark forum posts on Pensieve Print forum 0.1.2 - printer-friendly forums Expand all 1.0 - Expand all messages In-place Delete 1.0 - AJAX-style post delete Syntax 0.1 - Syntax highlighting for code blocks in the forums

                  N Offline
                  N Offline
                  Nish Nishant
                  wrote on last edited by
                  #19

                  Shog9 wrote:

                  A fence made entirely of posts? Yeah, i could see that... but it'd get real pricey (unless you were building it in the middle of a heavily wooded area and could just cut your own posts as-needed). Have you seen many of these?

                  In Kerala (my state in India), most fences are made of concrete - in the towns. In the villages, people do have fences that are essentially a stack of trees - living fences :-) The trees are planted one after the other in a line to form the fence. There's no spacing between each tree. Regards, Nish


                  Nish’s thoughts on MFC, C++/CLI and .NET (my blog)
                  Currently working on C++/CLI in Action for Manning Publications. Also visit the Ultimate Toolbox blog (New)

                  S 1 Reply Last reply
                  0
                  • N Nish Nishant

                    Shog9 wrote:

                    A fence made entirely of posts? Yeah, i could see that... but it'd get real pricey (unless you were building it in the middle of a heavily wooded area and could just cut your own posts as-needed). Have you seen many of these?

                    In Kerala (my state in India), most fences are made of concrete - in the towns. In the villages, people do have fences that are essentially a stack of trees - living fences :-) The trees are planted one after the other in a line to form the fence. There's no spacing between each tree. Regards, Nish


                    Nish’s thoughts on MFC, C++/CLI and .NET (my blog)
                    Currently working on C++/CLI in Action for Manning Publications. Also visit the Ultimate Toolbox blog (New)

                    S Offline
                    S Offline
                    Shog9 0
                    wrote on last edited by
                    #20

                    Nishant Sivakumar wrote:

                    The trees are planted one after the other in a line to form the fence. There's no spacing between each tree.

                    Neat. :)

                    ---- Scripts i’ve known... CPhog 1.0.0.0 - make CP better. Forum Bookmark 0.2.5 - bookmark forum posts on Pensieve Print forum 0.1.2 - printer-friendly forums Expand all 1.0 - Expand all messages In-place Delete 1.0 - AJAX-style post delete Syntax 0.1 - Syntax highlighting for code blocks in the forums

                    1 Reply Last reply
                    0
                    • S Shog9 0

                      Nishant Sivakumar wrote:

                      That's how I mentally pictured a fence :)

                      A fence made entirely of posts? Yeah, i could see that... but it'd get real pricey (unless you were building it in the middle of a heavily wooded area and could just cut your own posts as-needed). Have you seen many of these?

                      ---- Scripts i’ve known... CPhog 1.0.0.0 - make CP better. Forum Bookmark 0.2.5 - bookmark forum posts on Pensieve Print forum 0.1.2 - printer-friendly forums Expand all 1.0 - Expand all messages In-place Delete 1.0 - AJAX-style post delete Syntax 0.1 - Syntax highlighting for code blocks in the forums

                      J Offline
                      J Offline
                      JCParker
                      wrote on last edited by
                      #21

                      Yeah it is call a restraining wall, used to keep animals out of villages, used in the US when conquering the American west and displacing the Native Americans. Shots any one

                      1 Reply Last reply
                      0
                      • D Dan Neely

                        No. The setup for that type of question is: "you have X posts, that need to be spaced D distance apart (for the cross peices). How long of a strait fence can you make?" The common wrong anser is X*d. The correct answer is (X-1)*D. If you're confused about why, set X = 2, and draw the fence |-|. This's why an off by one error is also called a fencepost error.

                        J Offline
                        J Offline
                        Jesse Evans
                        wrote on last edited by
                        #22

                        dan neely wrote:

                        off by one error

                        That's an OBOB* in my lexicon.:-D (Appologies to our mascot!) *OBOB: Off-By-One Bug. A common error in looping/counting algorithms. 'til next we type... HAVE FUN!! -- Jesse

                        P 1 Reply Last reply
                        0
                        • J Jesse Evans

                          dan neely wrote:

                          off by one error

                          That's an OBOB* in my lexicon.:-D (Appologies to our mascot!) *OBOB: Off-By-One Bug. A common error in looping/counting algorithms. 'til next we type... HAVE FUN!! -- Jesse

                          P Offline
                          P Offline
                          peterchen
                          wrote on last edited by
                          #23

                          Obi-one


                          Some of us walk the memory lane, others plummet into a rabbit hole
                          Tree in C# || Fold With Us! || sighist

                          J 1 Reply Last reply
                          0
                          • P peterchen

                            Obi-one


                            Some of us walk the memory lane, others plummet into a rabbit hole
                            Tree in C# || Fold With Us! || sighist

                            J Offline
                            J Offline
                            Jesse Evans
                            wrote on last edited by
                            #24

                            :laugh::laugh::laugh: 'til next we type... HAVE FUN!! -- Jesse

                            1 Reply Last reply
                            0
                            • H hackC

                              A carpenter was in a terrible hurry. He had to work as quickly as possible to cut a very heavy 10 foot plank into 10 equal sections. If it takes 1 minute per cut, how long will it take him to get the 10 equal pieces? "C++ will solve any problem."

                              K Offline
                              K Offline
                              KaRl
                              wrote on last edited by
                              #25

                              It is easier to make war than to make peace.

                              Fold with us! ¤ flickr

                              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