View Code of Problem 52

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String input = scanner.nextLine();
        String trim = input.trim();
        char[] chars = trim.toCharArray();
        for (int i = chars.length - 1; i >= 0; i --) {
            System.out.print(chars[i]);
        }
    }
}

Double click to view unformatted code.


Back to problem 52