Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.gmail.sergiopartner;
- import java.util.Arrays;
- import java.util.Scanner;
- public class Main {
- public static void main(String[] args) {
- Scanner sc = new Scanner(System.in);
- int n;
- System.out.println("Input size of array");
- n = sc.nextInt();
- int[] a = new int[n];
- int b = 1;
- for (int i = 0; i < a.length; i += 1) {
- System.out.println("Input number " + b);
- a[i] = sc.nextInt();
- b += 1;
- }
- System.out.println("Congratulation you creat new array of " + n + " numbers!!!");
- System.out.println("And he has look " + Arrays.toString(a));
- }
- }
Add Comment
Please, Sign In to add comment