I have this project that let user inputs 5 different numbers from 1 to 50. But I want to validate it before saving to DB that i will be 5 unique numbers. What\'s the best an
Pseudocode: integer numbers[50] zeroarray(numbers, 50) integer count = 0; while (count < 5) { integer value = getinput() if (value >= 1 and value <= 50) if (numbers[value] = 0) { count = count + 1 numbers[value] = 1 } else reject duplicate else reject invalid }