HI,
kann mir einer erklären oder zeigen wo ich einen fehler habe? Ich versteh nicht wieso die letzte Bedingung bei mir fehlschlägt.
MfG
Steffen
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Hi,
is there somebody, who can help me solve this exercise. i do not understand why the last condition is wrong.
Best regards
Steffen
package de.codegym.task.task07.task0705;
import java.io.BufferedReader;
import java.io.InputStreamReader;
/*
Ein großes und zwei kleine Arrays
*/
public class Solution {
public static void main(String[] args) throws Exception {
//schreib hier deinen Code
BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
int i = 0;
int[] partA = new int[10];
int[] partB = new int[10];
int[] input = new int[20];
//input
for(int j = 0; j < 20; j++){
input[j] = Integer.parseInt(in.readLine());
//System.out.println("Array "+ " and der Stelle " + j + ": " + input[j]);
}
//calsulation
for(int j = 0; j < 10; j++){
partA[j] = input[i];
i++;
//System.out.println("i: " + partA[j]);
}
for(int j = 0; j < 10; j++){
partB[j] = input[i];
i++;
//System.out.println("i: " + partA[j]);
}
//output
for(int j = 0; j < 10; j++){
System.out.println(j + ": " + partA[j]);
}
for(int j = 0; j < 10; j++){
System.out.println(j + ": " + partB[j]);
}
}
}