Skip to content

Instantly share code, notes, and snippets.

@mojaie
Created December 2, 2011 08:49
Show Gist options
  • Save mojaie/1422388 to your computer and use it in GitHub Desktop.
Save mojaie/1422388 to your computer and use it in GitHub Desktop.
AOJ:0006
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scn = new Scanner(System.in);
String str = scn.next();
int strl = str.length();
String rstr = new String();
for (int i = 0; i < strl; i++) {
char c = str.charAt(strl - i - 1);
rstr = rstr + c;
}
System.out.println(rstr);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment