logo

Ewa Soboń - my C++

dynamic array

Simple dynamic array with duplicate detection.
The program:
- dynamically allocates memory based on user input,
- creates an integer array and fills it with pseudo-random values from -5 to 5,
- detects and displays each repeated value only once,
- frees the allocated memory.

The array used to store repeated values has 11 elements, as there are only 11 possible values from -5 to 5.

try console

To try the program, enter a value into STDIN first, then click the Run button.

Enter an integer value between 1 and 1000 for the array size (e.g., 10).
If you enter an invalid value or letters, click the Stop button.

There are some limitations in the mobile version of the compiler. For the full experience, please use a PC.

+48 608 212 475
ewa.beata.sobon@gmail.com
+48 608 212 475 ewa.beata.sobon@gmail.com