View Code of Problem 52

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String  string = sc.nextLine();
//        char[] chars = new char[string.length()];
        for (int length = string.length()-1; length >= 0; length--) {
            System.out.print(string.charAt(length));
        }
    }
}

Double click to view unformatted code.


Back to problem 52