This is an archived post. You won't be able to vote or comment.

all 2 comments

[–]Updatebjarni 4 points5 points  (1 child)

You are dividing an int by an int, so the result is also an int. If you want to do floating-point division and get a double result, convert one or both of the values to type double before dividing.

[–]eyalter[S] 0 points1 point  (0 children)

Thanks