Assignment 2 error

I keep getting this error, how do i solve?

It tells you that cost must be an int return type! There is also a possibility you are not implementing the function right because it gives you a wrong output. Go back to the function implementation and check it.