simple question: this will look like after the run:
text:
2
4
2 text
but i want this:
text: 2 - 4
2 text
System.out.println("text:");
for (int i = 0; i < tomb.length; i++) {
if (tomb[i] % 2 == 0) {
System.out.println("" + tomb[i]);
db++;
}
}
System.out.println(db + " text");
printlnlitteraly means printline, which prints out the text with a new line afterwards. You can useprintif you want no new line.