Computer Science, asked by mkhetan122, 9 months ago

5. The driver took a drive to a town 240 km at a speed of 60 km/h. Later in the evening,
he drove back at 20 km/h less than the usual speed. Write a Java program to calculate:
(i) the total time taken by the driver
(ii) the average speed during the whole journey

Answers

Answered by vuma232006
1

Answer:

1) 10 hrs 2) 48 km/h

Explanation:

1)time = distance /speed

240 / 60

= 4 hrs

time = distance /speed

240/(60-20)

240/40

=6hrs

total time = 6hrs + 4hrs

=10hrs

2) average speed = total distance /total time

average speed = 240 *2 /10hrs

= 480/10= 48km / hr

Similar questions