I'm working with an iOS project where I have to do a bit of math. Can anyone explain to me why these two implementations return different results?
float total = 31/30;
NSLog(@"%f", total); // returns 1.00000 in console
float total2 = 31/30.0;
NSLog(@"%f", total2); // returns 1.03333 in console