Take a look at lines 60-61. Every time the user inputs a number, you cycle through all the elements of b[] and you
set them all equal to the most recent entry. When all is said and done, you have an entire array full of the exact same number. I'm not sure exactly what you meant to do with that array, but I don't think that's correct.