Question: please USE C-Language Write a program to print the flight time between two airports. The graph that connects these airports is shown in Figure 1.

 please USE C-Language Write a program to print the flight time

please USE C-Language

Write a program to print the flight time between two airports. The graph that connects these airports is shown in Figure 1. Use adjacency matrix to represent the graph. 2 hrs 6 hrs 0 - Kuala Lumpur 1- Bangkok 2 - Tokyo 3- New Delhi 4- Brisbane 9 hrs 3 hrs 0 8 hrs 4 hrs 4 hrs Figure 1 The program should: a) Print the list of airports using a function called printAirports bl Prompt user to key in an origin and a destination airport c) Print the flight time from the origin to the destination. If there is no direct flight, print "No direct flight" An example of the output is shown in Figure 2. Airports D Kuala Lumpur 1 Bangkok 2 Tokyo 3 New Dehli 4 Brisbane Origin: 1 Destination: 3 Bangkok to New Dehli! 3 hours Figure 2 Note: BOLD and underlined denotes user's input

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!