Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class Main{
- public static void main(String[] args) {
- String word1;
- char[] wordCh;
- String word2;
- Scanner input = new Scanner(System.in);
- word1 = input.next();
- word2 = input.next();
- wordCh = word1.toCharArray();
- for(int x=wordCh.length-1;x>=0;--x) {
- System.out.print(wordCh[x]);
- }
- System.out.print(" "+word2);
- }
- }
Add Comment
Please, Sign In to add comment