Okay, first thing first. Your function prototype is missing the array name.
void PopulateArray(int[], int size)
Next if(Fail)true is invalid. The way you would test if it's true or false is by if(Fail()) because its returning either true or false.
Next. failed =+ 1; is setting failed equal to positive 1. I'm assuming you're trying to increment it every time, you do that like this failed += 1. Or even simpler just failed++;
Then everything else just kind of confused me.
That's why I posted my version of your program. Hopefully it can help you. If you need me to clarify anything don't hesitate to ask. I'm new to programming too ^_^
You know what I totally scrambled alot of the description and the code since i rushed it in class then just tried to add things to make it work causing more problems. Thank you for your help i see where i had things backwards and completely off which was why my output failed. The Fail bool was just me putting something there to show what i kind of wanted I had no idea of how to actually implement it, so i thank you for that to and the great explanation :).