English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

1 answers

public class Test {
public static void main(String[] args) {
try {
BufferedReader br = new BufferedReader( new InputStreamReader( System.in));
String s = br.readLine();
for (int i=s.length()-1; i>=0; --i)
System.out.print(s.charAt(i));
System.out.println();
} catch (Throwable th) {
th.printStacktrace();
} } }

============
Sample input:
Hello, world.

Corresponding output:
.dlrow ,olleH

2007-07-07 09:01:45 · answer #1 · answered by McFate 7 · 1 0

fedest.com, questions and answers