My code compiles, but when running it, it continues to infinity. How do I change that?

Here is the problem:

The distance a vehicle travels can be calculated as follows:
Distance = Speed *...