Program that computes the total price of tickets

Assignment Help C/C++ Programming
Reference no: EM13708702

Question: Bluebird Airlines has flights from Phoenix to six other cities in Arizona. The cities are referred to by number,1 to 6.The price for a round-trip ticket to each of the cities is shown here.

City 1 2 3 4 5 6

Price 56.79 105.69 93.49 155.99 87.49 73.99

Program: Write a program that computes the total price of tickets that a customer orders. The program should prompt the user for the number of the destination city and the number of tickets desired.

If the user enters an invalid city number, the program should display an error message and terminate.

The program should display the total price of the ticket order. Use an array to store the ticket price table.

Reference no: EM13708702

Questions Cloud

Sketch the 2s, 3p, and the 3d orbitals using 3- dimensional : Question- Sketch the 2s, 3p, and the 3d orbitals using 3- dimensional axes for each plot (you will have total of 9 plots for the orbitals) label each plot with the specific orbital orientation,
Calculate the ph of a buffer solution : Question- Calculate the pH of a buffer solution obtained by dissolving 15.0 g of KH2PO4 (s) and 29.0 g of Na2HPO4 (s) in water and then diluting to 1.00 L
Prepare a program to sorts the array into decreasing order : Write a program that inputs the 20 incomes into an array and then sorts the array into decreasing order - Prepare a program to sorts the array into decreasing order.
Calculate the change in ph when naoh is added : Question- Calculate the change in pH when 8.00 ml of .100 M HCl (aq) is added to 100 ml of a buffer solution that is .100 M in NH3 (aq) and .100 M in NH4Cl (aq). Calculate the change in pH when 8.00 ml of .100 M NaOH (aq) is added to the original b..
Program that computes the total price of tickets : Write a program that computes the total price of tickets that a customer orders. The program should prompt the user for the number of the destination city and the number of tickets desired.
Computes the product of all elements in a vector : Write a C function that computes the product of all elements in a vector x of dimension n. The elements of the vector are stored in a double array of size n.
How much of each solution should be mixed to prepare buffer : Question- You need to prepare 100 ml of a pH = 4.00 buffer solution using 0.100 M Benzoinc acid (pka = 4.20) and 0.120 M sodium benzoate. How much of each solution should be mixed to prepare this buffer
Prepare a c function that returns the number of elements : Prepare a C function that returns the number of elements smaller than 3.0 in an array - make a function returns the number of elements.
What is the volume occupied by argon gas at a pressure : Question- What is the volume occupied by 22.3g of argon gas at a pressure of 1.48atm and a temperature of 469K. Express your answer with the appropriate units.

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Write a program in c tonbspreverse the order of elements on

write a program in c tonbspreverse the order of elements on a stack s using two additional stacks using one additional

  Submap that accepts two maps from strings

Write a method called subMap that accepts two maps from strings to strings as its parameters and returns true if every key in the first map is also contained in the second map and maps to the same

  Linked list in c++

If the following C++ code is valid, show the output. If it is invalid, explain why.

  Write c program to read one ip address

Write a C or C++ program which Read one IP address at a time from Dec_IPAddresses.txt and convert it into Hex. Store converted values stored in another file (e.g. HEX_IPAddresses.txt).

  Write a program using the rand() function

Write a program using the rand() function and a large array to find the standard deviation, variance and mean as well as the min and max values of the array.

  Write a program to calculate cars mileage

If you are using VisualStudio 2005, you should include time.h. The call to srand should use the time rather than a number entered by the user and looks like this: srand( static_cast(time( NULL )) ).

  To deal with deadlocks we can either use prevention or

to deal with deadlocks we can either use prevention or avoidance or detection followed by recovery. but which is a

  Preparing a high level language program

Describe the purpose of each step in preparing a high level language program for execution (editing, compiling, linking, and loading).  Include in your description the types of files created with each of the first three steps.?

  Write a program in which set up a douhly-subscripted array

Write a program in which you set up a douhly-subscripted array to store each character in the wit. Ube ;old loops, and the most efficient  statements to do it. Include documentation (comment stmts.) in your program.

  Calculate the celsius equivalent of a fahrenheit temperature

Construct a program that allows you to calculate the Celsius equivalent of a Fahrenheit temperature.

  Show the orders that produce different values

Provide an example in C++ of an expression whose value depends upon the evaluation order - Show the orders that produce different values and the values they produce.

  Write a function sum3darray

Write a function sum3DArray. This function will take a three dimensional array of ints and add all the entries in the three dimensional array. Assume columns and rank are two constants already defined.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd