It appears that when you are assigning values to the array "int user[5]", that you are not specifiying the position of the value in the array.
For example, should "if(attempt == 5) { user = 12;}" be something like "if(attempt == 5) {user[4] = 12;}" ?