Write a program below |
import java.util.ArrayList;
import java.util.Scanner;
public class Main
{
public static void main(String[] args) {
int n;
Scanner in = new Scanner(System.in);
n = in.nextInt();
ArrayList<Integer> arr = new ArrayList<Integer>();
for(int i=0;i<n;i++) {
int a = in.nextInt();
arr.add(a);
}
|
|
for (Integer a: arr)
{
System.out.print(a+" ");
}
}
}
|