Skip to content

Instantly share code, notes, and snippets.

View romec512's full-sized avatar
💭
working on my project

romec512

💭
working on my project
  • Kazan
View GitHub Profile
int [] mass = {10, 2, 3, 3, 4, 1, 1, 1, 2, 6};
int [] quantity = {1, 2, 3, 4, 5};
int [] results = {0, 0, 0, 0, 0};
for (int i = 0; i < mass.length; i++) {
for (int j = 0; j < quantity.length; j++) {
if (mass[i] == quantity[j]) {
results[j]++;
break; //Зачем break тут?
}
}