Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.company;
- import java.util.Scanner;
- public class Main {
- public static void main(String[] args) {
- Scanner console = new Scanner(System.in);
- int count = console.nextInt();
- int myArray[]= new int [count];
- for (int i =0; i < myArray.length ; i++) {
- int number=console.nextInt();
- myArray[i]=number;
- }
- for (int i = 0 ; i < myArray.length ; i++) {
- System.out.print(myArray[i]);
- }
- for (int i = myArray.length - 1; i>= 0 ; i--) {
- System.out.print(myArray[i]);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement