In another Bruce Eckels exercise in calculating velocity, v = s / t where s and t are integers. How do I make it so the division cranks out a float?
v = s / t
You can cast even just one of them, but for consistency you may want to explicitly cast both so something like v = (float)s / (float)t should work.