Код: Выделить всё
int[] values = new int[5] { 1, 2, 3, 4, 5 };
Код: Выделить всё
bool all_values_are_different()
{
for(int i = 0; i < values.Length - 1; i++)
{
search = values[i];
for(int j = i + 1; j < 5; i++)
{
if(search == values[i])
return false;
}
}
return true;
}
Подробнее здесь: https://stackoverflow.com/questions/243 ... -different
Мобильная версия