I saw the Euler's thread, and i implemented a function which calculates it correctly, however my program is just turning everything to ints =(

I'm using floats for the variables that need to be decimals, but every fraction i have it calculate (ie. 1/2), it turns to a decimal first, and then adds it. I don't understand this at all.

Any help?