import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); String input = sc.nextLine(); String[] chars = input.split(""); for(int i = chars.length - 1; i >= 0; i --) { System.out.print(chars[i]); } } } |
Double click to view unformatted code.