(1/i)
i is an int, so that's integer division, resulting in 0 if i > 1. Use 1.0/i to get floating point division.
i
int
i > 1
1.0/i
2.1m questions
2.1m answers
60 comments
57.0k users