hey cos !
i'm completely locked
in netbeans this works with randoms numbers
why not here?
package com.codegym.task.task07.task0705;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.Arrays;
/*
One large array and two small ones
*/
public class Solution {
public static void main(String[] args) throws Exception {
//write your code
BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));
int [] grande = new int [20];
for( int i = 0 ; i<grande.length ; i++){
grande[i] = Integer.parseInt(bf.readLine());
}
System.out.println(Arrays.deepToString(copiaendos(grande)));
}
private static int [][] copiaendos(int [] grande){
int [] array1 = new int [10];
int [] array2 = new int [10];
int j = 0;
for ( int i = 0 ; i<grande.length ; i++ ){
if(i<grande.length/2){
array1[i] = grande[i];
}else if (i>=grande.length/2) {
array2[j] = grande[i];
j++;
}else if(i>grande.length && j>grande.length/2){
break;
}
}
return new int [][]{array1,array2};
}
}