Do you really want it to return an integer? By its very definition this will round the answer.

I would have thought you ought to be using a double as this is what the Sqrt function returns.