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. General Programming
  3. C#
  4. recursive

recursive

Scheduled Pinned Locked Moved C#
data-structureshelptutorialquestion
13 Posts 7 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.
  • N Offline
    N Offline
    nesfrank
    wrote on last edited by
    #1

    Can someone help me or give me some sample code to read or display elements of an array (array could be one, 2,3, 4...dimensions). we need to read the array recursively and using not more than one loop. I don't know how to handle it. can someone shed some idea or code?

    L E P P 4 Replies Last reply
    0
    • N nesfrank

      Can someone help me or give me some sample code to read or display elements of an array (array could be one, 2,3, 4...dimensions). we need to read the array recursively and using not more than one loop. I don't know how to handle it. can someone shed some idea or code?

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

      This sounds like a homework assignment, so I won't post the (easy) solution here. Just one hint: Loop over each item in the first dimension of the array and call this function recursively for each item. regards

      N 1 Reply Last reply
      0
      • L Lost User

        This sounds like a homework assignment, so I won't post the (easy) solution here. Just one hint: Loop over each item in the first dimension of the array and call this function recursively for each item. regards

        N Offline
        N Offline
        nesfrank
        wrote on last edited by
        #3

        please helpme if you can. I will appreciate it.

        J 1 Reply Last reply
        0
        • N nesfrank

          Can someone help me or give me some sample code to read or display elements of an array (array could be one, 2,3, 4...dimensions). we need to read the array recursively and using not more than one loop. I don't know how to handle it. can someone shed some idea or code?

          E Offline
          E Offline
          Ennis Ray Lynch Jr
          wrote on last edited by
          #4

          With a little bit of thought you shouldn't need a loop at all. The real question is do you want to display the results, pre-order or post-order?

          Need software developed? Offering C# development all over the United States, ERL GLOBAL, Inc is the only call you will have to make.
          Happiness in intelligent people is the rarest thing I know. -- Ernest Hemingway
          Most of this sig is for Google, not ego.

          N L 2 Replies Last reply
          0
          • N nesfrank

            please helpme if you can. I will appreciate it.

            J Offline
            J Offline
            J4amieC
            wrote on last edited by
            #5

            He just did. he told you how to do it. As has been said a thousand times, we'll help you do your homework but we wont do it for you!

            1 Reply Last reply
            0
            • E Ennis Ray Lynch Jr

              With a little bit of thought you shouldn't need a loop at all. The real question is do you want to display the results, pre-order or post-order?

              Need software developed? Offering C# development all over the United States, ERL GLOBAL, Inc is the only call you will have to make.
              Happiness in intelligent people is the rarest thing I know. -- Ernest Hemingway
              Most of this sig is for Google, not ego.

              N Offline
              N Offline
              nesfrank
              wrote on last edited by
              #6

              please help me if yiou have time. I have a big hope on this forum. I am entry level and not sr like you. please help and God will give it on return.

              E 1 Reply Last reply
              0
              • N nesfrank

                please help me if yiou have time. I have a big hope on this forum. I am entry level and not sr like you. please help and God will give it on return.

                E Offline
                E Offline
                Ennis Ray Lynch Jr
                wrote on last edited by
                #7

                God helps those that help themselves. This isn't a Senior Developer problem, this is a trivial Freshman Comp Sci question that everyone gets in the first month of the course. Asking us for the answer is cheating and grounds for dismal at every University in the United States. How is giving you the answer helping anyone?

                Need software developed? Offering C# development all over the United States, ERL GLOBAL, Inc is the only call you will have to make.
                Happiness in intelligent people is the rarest thing I know. -- Ernest Hemingway
                Most of this sig is for Google, not ego.

                D 1 Reply Last reply
                0
                • E Ennis Ray Lynch Jr

                  With a little bit of thought you shouldn't need a loop at all. The real question is do you want to display the results, pre-order or post-order?

                  Need software developed? Offering C# development all over the United States, ERL GLOBAL, Inc is the only call you will have to make.
                  Happiness in intelligent people is the rarest thing I know. -- Ernest Hemingway
                  Most of this sig is for Google, not ego.

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

                  What about inorder? ;)

                  E 1 Reply Last reply
                  0
                  • L Lost User

                    What about inorder? ;)

                    E Offline
                    E Offline
                    Ennis Ray Lynch Jr
                    wrote on last edited by
                    #9

                    Yeah, I wrote that the first time, and then couldn't remember if it was the same as pre-order. Rather than looking it up I just deleted it. Error's of omission aren't as bad inaccuracies I suppose.

                    Need software developed? Offering C# development all over the United States, ERL GLOBAL, Inc is the only call you will have to make.
                    Happiness in intelligent people is the rarest thing I know. -- Ernest Hemingway
                    Most of this sig is for Google, not ego.

                    1 Reply Last reply
                    0
                    • N nesfrank

                      Can someone help me or give me some sample code to read or display elements of an array (array could be one, 2,3, 4...dimensions). we need to read the array recursively and using not more than one loop. I don't know how to handle it. can someone shed some idea or code?

                      P Offline
                      P Offline
                      Paul Conrad
                      wrote on last edited by
                      #10

                      nesfrank wrote:

                      give me some sample code

                      No. This is a very basic computer science problem that is found in most intro programming courses, thus reeks of homework. Try doing it yourself and when stumped on a part of your own written code, then ask for help.

                      "The clue train passed his station without stopping." - John Simmons / outlaw programmer "Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon "Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham

                      1 Reply Last reply
                      0
                      • N nesfrank

                        Can someone help me or give me some sample code to read or display elements of an array (array could be one, 2,3, 4...dimensions). we need to read the array recursively and using not more than one loop. I don't know how to handle it. can someone shed some idea or code?

                        P Offline
                        P Offline
                        Professor Sharada Ulhas
                        wrote on last edited by
                        #11

                        frank! this is ur Professor Ulhas from university. i am saddend when i see u posting my homowork assignment on the cpian web sight. i told u, "do not post homework ass ighment on the web sites!" but u dod not listen. u make me sad. :(( i will go home and make loud lamentations to shiva for this. :(( :((

                        Sincelery yours, Computer Information conSciences Professor and grader, Sharada Ulhas

                        P 1 Reply Last reply
                        0
                        • E Ennis Ray Lynch Jr

                          God helps those that help themselves. This isn't a Senior Developer problem, this is a trivial Freshman Comp Sci question that everyone gets in the first month of the course. Asking us for the answer is cheating and grounds for dismal at every University in the United States. How is giving you the answer helping anyone?

                          Need software developed? Offering C# development all over the United States, ERL GLOBAL, Inc is the only call you will have to make.
                          Happiness in intelligent people is the rarest thing I know. -- Ernest Hemingway
                          Most of this sig is for Google, not ego.

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

                          Ennis Ray Lynch, Jr. wrote:

                          How is giving you the answer helping anyone?

                          By getting him kicked out of school for cheating, we won't have to clean up his 'work' after he graduates. X|

                          Today's lesson is brought to you by the word "niggardly". Remember kids, don't attribute to racism what can be explained by Scandinavian language roots. -- Robert Royall

                          1 Reply Last reply
                          0
                          • P Professor Sharada Ulhas

                            frank! this is ur Professor Ulhas from university. i am saddend when i see u posting my homowork assignment on the cpian web sight. i told u, "do not post homework ass ighment on the web sites!" but u dod not listen. u make me sad. :(( i will go home and make loud lamentations to shiva for this. :(( :((

                            Sincelery yours, Computer Information conSciences Professor and grader, Sharada Ulhas

                            P Offline
                            P Offline
                            Paul Conrad
                            wrote on last edited by
                            #13

                            Good to see you again, professor :)

                            "The clue train passed his station without stopping." - John Simmons / outlaw programmer "Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon "Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham

                            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