Duplicate integers in array

User enters 10 integers in array and all numbers needs to be different and if he enters a number that was already entered (duplicate) how to give him another chance to enter new one, so that all numbers are different from eachother, can someone write me code fast.

Ty guys, god bless.
Are you allowed to use std::set? It would make this assignment much easier.
http://www.cplusplus.com/reference/set/set/
http://en.cppreference.com/w/cpp/container/set
Last edited on
can someone write me code

No.

Whatever the container is (array, set, ...):
WHILE not enough numbers in container C and user gives a new number V
    IF V is not in C
    THEN add V to C
Topic archived. No new replies allowed.