Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package DPM;
- import java.util.Scanner;
- public class Main {
- public static void main(String[] args) {
- Scanner scan = new Scanner(System.in);
- String line = "";
- while (!"end".equals(line=scan.nextLine()){
- String newLine = "";
- for (int i = line.length()-1; i >=0 ; i--) {
- newLine += line.charAt(i);
- }
- System.out.printf("%s = %s\n",line, newLine);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement