Answered step by step
Verified Expert Solution
Link Copied!

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.

image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Fundamentals Of Database Management Systems

Authors: Mark L. Gillenson

2nd Edition

0470624701, 978-0470624708

More Books

Students also viewed these Databases questions

Question

What is meant by the term bond mispricings?

Answered: 1 week ago

Question

What does this public know about your organization?

Answered: 1 week ago