Guest User

Untitled

a guest
Sep 8th, 2021
502
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class ArraysPrTask2 {
  4. public static void main(String[] args) {
  5. Scanner scanner = new Scanner(System.in);
  6. String line = scanner.nextLine();
  7. String[] inputStr = line.split("");
  8. for (int i = inputStr.length - 1; i >= 0; i--) {
  9. System.out.print(inputStr[i]);
  10. }
  11. }
  12. }
Advertisement
Add Comment
Please, Sign In to add comment