-
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
-
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
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks