Files
HackerRank-Solutions/Java/Data Structures/Java 1D Array/Solution.java
T

23 lines
574 B
Java
Raw Normal View History

2017-02-16 23:51:56 -06:00
// Author: Rodney Shaghoulian
2018-07-27 16:45:56 -07:00
// Github: github.com/RodneyShag
// HackerRank: hackerrank.com/RodneyShag
2017-02-16 23:51:56 -06:00
import java.util.*;
public class Solution {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
int n = scan.nextInt();
int [] a = new int[n];
for (int i = 0 ; i < n; i++) {
a[i] = scan.nextInt();
}
scan.close();
// Prints each sequential element in array a
for (int i = 0; i < a.length; i++) {
System.out.println(a[i]);
}
}
}