Created
December 2, 2011 08:49
-
-
Save mojaie/1422388 to your computer and use it in GitHub Desktop.
AOJ:0006
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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