I was previously getting the error "variable min might not have been initialized" so I changed int min; to int min = 0 and the program runs, however it is now giving me the last error and I cant figure it out.