package com.codegym.task.task07.task0705; import java.io.BufferedReader; import java.io.InputStreamReader; import java.util.Scanner; /* One large array and two small ones */ public class Solution { public static void main(String[] args){ Scanner scanner = new Scanner(System.in); int massiv[] = new int[20]; for (int i = 0; i <20 ; i++) { massiv[i] = scanner.nextInt(); } int massiv1[] = new int[10]; int massiv2[] = new int[10]; for (int i = 0; i <10 ; i++) { massiv1[i] = massiv[i]; } for (int i = 10; i <20 ; i++) { massiv2[i-10] = massiv[i]; } System.out.println("This is the first array:"); for (int i = 0; i <10 ; i++) { massiv[i] = massiv1[i]; System.out.println(massiv1[i]); } System.out.println(""); System.out.println("This is the second array:"); for (int i = 10; i <20 ; i++) { massiv[i] = massiv2[i-10]; System.out.println(massiv2[i-10]); } } }