-
-
Save mariiaKolokolova/00311b198e169e146e879ff1c9286ece to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package maricka.kolokolova; | |
import java.util.Arrays; | |
import java.util.Scanner; | |
public class Main { | |
public static void main(String[] args) { | |
// TODO Auto-generated method stub | |
int n = 0; | |
Scanner sc = new Scanner(System.in); | |
System.out.println("Input length of array:"); | |
n = sc.nextInt(); | |
int[] mass = new int[n]; | |
for (int i = 0; i < n; i++) { | |
System.out.println("Input " + i + " elements:"); | |
mass[i] = sc.nextInt(); | |
} | |
System.out.println("Your array is : " + Arrays.toString(mass)); | |
sc.close(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment