Hello, and welcome in the forum.
First of all i would suggest you format your code a bit more readable. Codeblocks can help you here: select all your code text->right click->Format astyle. Identation is not forced by c/c++ but it helps a lot other and yourself when reading code.
Second, if your program compiles then the work of codeblocks is done. Everything what happens when the black console window pops up has nothing to do with codeblocks but only with your code.
I have absolute no idea what your code does, but some notes:
1) You are accessing an array with user selectable index without range check:
cin>> y;
for (x=0;x<3;x++) //OUTPUT REPEAT IS 'x' TIMES
{
// ========================== OUTER LOOP START =====================================
for (i=1;i<=y;i++)
{
num = rand()% y+1; // RANDOM NUMBER IS -- FROM 1 TO "y"
a[i] = num;
the variable y can be > 15 but your array is only 16 elements wide. This will lead to invalid memory access...
for (i=1;i<=y;i++)
{
num = rand()% y+1; // RANDOM NUMBER IS -- FROM 1 TO "y"
a[i] = num;
/**** other code ****////
if (a[i] == a[j-1])
(i--) ;
here you decrement the loop index (i) that you inceremtn in the for. This looks suspicious like an endless loop like you are experiencing. I would never change the loop index backwards...
You are calling rand and then check if this value is already in the list. Remember: An array full of 1 can be also random (obligatory xkcd:
https://xkcd.com/221/ )
Arrays start with index 0 not 1
for (i=1;i<=y;i++)
{
num = rand()% y+1; // RANDOM NUMBER IS -- FROM 1 TO "y"
a[i] = num;
And last but not least, and i probably think the reason of your problem:
the array a[16] is not initialized, it contains random numbers when you run your application.
When this array now contains all numbers from 1 to 8 then your loop will never terminate, because it can not find a non dublicate number...
I woudl recommend to inizialize your array with
for (i = 0; i < 16; ++i)
a[i] = -1;
this would also explain why your code runs in an online container. It would be possible that they initialuze the memory before they call your code...