Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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 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 inputStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started