47.0k views
2 votes
Given two integer variables distance and speed, write an expression that divides distance by speed using floating point arithmetic, i.e. a fractional result should be produced.

User Eugenie
by
8.5k points

1 Answer

3 votes

Answer:


(Distance)/((double) speed).

Step-by-step explanation:

For the given two integer variables speed and distance ,the expression that divides distance by speed given as
(Distance)/((double) speed).

So the expression is
(Distance)/((double) speed).


(Distance)/((double) speed) it means that when we double the speed of a vehicle then the braking distance travel will become one forth.

User DGibbs
by
7.8k points