Two cars a and b leave an intersection at the same time car


Two cars A and B leave an intersection at the same time. Car A travels west at an average speed of x miles per hour and car B travels south at an average speed of y miles per hour.

Develop a program that prompts the user to enter:

  1. The average speed of both the cars
  2. The elapsed time (in hours and minutes, separated by a space)Ex: For two hours and 30 minutes, 2 30 would be entered

The program then outputs:

  1. The (shortest) distance between the cars.

Solution Preview :

Prepared by a verified Expert
Basic Computer Science: Two cars a and b leave an intersection at the same time car
Reference No:- TGS02651625

Now Priced at $20 (50% Discount)

Recommended (93%)

Rated (4.5/5)