recursion


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: recursion

  1. #1
    chad Guest

    recursion


    hey need some help :>
    im write some code using recursion. this code must read in from a file
    then take the text and write it all backwords. just wondering if you any
    one can help me out. im kinda lost.

    here is an example:

    One ring to rule them all.
    One ring to find them.
    One ring to bring them all,
    and in the darkness bind them.


    Then the output file would look as follows:


    .meht dnib ssenkrad eht ni dna
    ,lla meht gnirb ot gnir enO
    .meht dnif ot gnir enO
    .lla meht elur ot gnir enO

    thanks for the help


  2. #2
    WhizBang Guest

    Re: recursion


    nothing to do with recursion...
    read the file into a char array,
    and for (i = array.length-1; i>=0; System.out.print(array[i--]));

    "chad" <java..@127.0.0.1> wrote:
    >
    >hey need some help :>
    >im write some code using recursion. this code must read in from a file
    >then take the text and write it all backwords. just wondering if you any
    >one can help me out. im kinda lost.
    >
    >here is an example:
    >
    >One ring to rule them all.
    >One ring to find them.
    >One ring to bring them all,
    >and in the darkness bind them.
    >
    >
    >Then the output file would look as follows:
    >
    >
    >.meht dnib ssenkrad eht ni dna
    >,lla meht gnirb ot gnir enO
    >.meht dnif ot gnir enO
    >.lla meht elur ot gnir enO
    >
    >thanks for the help
    >



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center