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 the class definition for a class called complex

. Write the class definition for a class called complex.

  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 program which initialize an integer array

Write a program which performs the tasks - return the control to main( )and print the new array elements in main.

  Asignment1questionwrite a recursive function void reverse

assignment1questionwrite a recursive function void reverse that reverse a sentence.for examplesentence greeting new

  Concept of object-oriented programming

Determine the manner in which each of the provided concepts relates to the concept of object-oriented programming. Justify your response - Analyze the fundamental manner in which they each relate to C++ coding of programs.

  Complexity of quick sort algorithm

Write a c program to experimentally compare the O() complexities of the provided quick sort algorithm

  Write the definition of the member function two of yclass

Write the definition of the member function two of yClass so that the private member variable a is initialized to the value of the first parameter of two, and the private member variable b is initialized to the value of the second parameter of two..

  Which respectively represent the name of the flower

Write a C++ class, Flower, that has three member variables of type string, int, and float, which respectively represent the name of the flower, its number of pedals, and price.

  Write in c++. read an inputfile.txt

write in C++.  read an inputFile.txt which contains integers that are virutal addresses, and I am suppossed to translate that into physical addresses using a page table and a transition lookaside buffer

  Demonstrate your code compiles and runs for a test case

Use a For loop to iterate through the array and input the values. Demonstrate your code compiles and runs for a test case of your choice.

  Design a program that asks for the number of fat grams

Starting out with Programming logic and design 3rd Author Tony Gaddis - Pg 279, PE 3 Fat Grams Calculator

  Describe what kind of architecture the new payroll

you have been tasked with building a payroll program for a large organization with offices spread across the united

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