Hello, everyone. First time poster here. I'm rather inexperienced with C++, and I was wondering if anyone could help me out.

The problem is that I have declared a float, which I have called pi, but when I make an attempt to add, say, (1 / 5) to pi, the addition is rounded to the nearest whole number. (In this case, zero.)

So, is there any way of doing this? It is necessary that I add the number in numerator/denominator style, so decimal is out of the question.

Thanks.