I wanted to have a program that inputs the number of elements in the array, inputs the int variable of the element and outputs the numbers in random order, without repeating the same element twice.
I have no error but sometimes it outputs big numbers i didn't input, thanks in advance.
The way you've created the array on line 10 is only valid if you know the size of the array at compile time. If you only know the size of the array at runtime, fr example after the user enters a value, then you need to dynamically allocate the array using new (and later delete).
Line 10 works with some compilers but it isn't standard C++.
As wildblue says, you're swapping the input number with a random number that might not be initialized. You need to input all the numbers first, then shuffle them, then output the shuffled set of numbers.