Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class NumbersInReversedOrder {
- public static void main(String[] args) {
- Scanner input = new Scanner(System.in);
- String number = input.nextLine();
- StringBuilder number1 = new StringBuilder();
- number1.append(number);
- number1 = number1.reverse();
- for (int i = 0; i < number1.length(); i++)
- System.out.print(number1.charAt(i));
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement