what program reads and send some outPut
mKorbel
Veteran Poster
1,141 posts since Feb 2011
Reputation Points: 480
Solved Threads: 224
Normally i don't do homework assignments, but hey , i'm in a good mood..
I haven't tested this code, but i think it should do the trick.
String input = "dog";
String output = "";
for (int i = (input.length() - 1); i >= 0; i--)
output += (input.charAt(i));
for(int i = output.length(); i > 0 ; i--)
System.out.println(output.substring(output.length()-i,output.length()));
}
steelshark
Junior Poster in Training
57 posts since Sep 2010
Reputation Points: 10
Solved Threads: 5
Nope, doesn't work - and as a general rule we don't just hand students completed solutions to their homework problems.
Ezzaral
Posting Genius
15,986 posts since May 2007
Reputation Points: 3,250
Solved Threads: 847
well, it needs a litle finetuning i agree on that ;)
but it should get him started on figuring it out on his own..
steelshark
Junior Poster in Training
57 posts since Sep 2010
Reputation Points: 10
Solved Threads: 5