Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Macroeconomics Expert

A local art gallery has tasked you with writing a computer program that computes the ticket price based on the visitor's age. Because of the high value of the art exhibits, only visitors 12 years and older are allowed in the art gallery. This means that only ages 12 and higher are valid for this program. The program should ask the visitor to re-enter his or her age if the age entered is less than 12. Use a loop structure to allow the visitor to re-enter his or her age if an invalid age was entered.

The program should use if-statements, that computes the ticket price according to this schedule, given the visitor's age:

  • Ages 12-17 5.00 dollars
  • Ages 18-55 25.00
  • Ages 56 and older 10.00 dollars

The program should output a message that says "Thank you for vising our art gallery. Your ticket price is " followed by the dollar amount of the ticket price. Example output for a visitor that is 55:

Thank you visiting our art gallery. Your ticket price is 25.00

First, describe your algorithm using pseudocode.

Translate the pseudocode into a C++ program. You must comment your program including comments at the top of the file that explains what the program does and comments for every line of code that explains what is happening for the line of code. Apply troubleshooting and testing strategies to ensure your code compiles, runs, and provides accurate results.

Macroeconomics, Economics

  • Category:- Macroeconomics
  • Reference No.:- M92026308
  • Price:- $20

Priced at Now at $20, Verified Solution

Have any Question?


Related Questions in Macroeconomics

Question - in this question i will guide you through a

Question - In this question, I will guide you through a simple AK model. The so-called AK model is a special case of the Solow Model. The production function is simply Y = AK so 1/3 for capital in the last question becom ...

Question you do not need to have seen the movie the

Question: You do not need to have seen the movie, the question is based on Carl Menger's Theory of the Good. In the movie, "Cast Away," Tom Hanks played the character Chuck Noland, who was stranded on a deserted island f ...

Question please do it by type not pic1 beginning in a state

Question: Please do it by type not pic. 1. Beginning in a state of equilibrium in our consumer equilibrium model (food is situated on the Y-axis and beverage on the X-axis). Graphically illustrate the income and substitu ...

Question draw a long run average cost and marginal cost

Question: Draw a long run average cost and marginal cost curve for a business and explain why they have this shape. - Also on the graph show a P1 that is very profitable for this firm and the Q1 associated with this P1. ...

Question - a a firm producing two products x and y where x

Question - a. A firm producing two products X and Y where x and y are the quantity of product X and Y produced respectively. If the firm produces on the same isocost and has a fixed cost of $1000. Given the marginal cost ...

Question explain which direction the below referenced

Question: Explain which direction the below referenced supply or demand curve will shift AND comment on the impact of the shift on equilibrium price and quantity. a) John, who is a clothing producer, now has to pay more ...

Question scenario imagine you are a business consultant to

Question: Scenario: Imagine you are a business consultant to a Business. You have been asked to analyze, advise, and create recommendations on how the firm can ensure its future success in its current market. Prepare a m ...

Question - feldstein 2012 indicates that the hospital is

Question - Feldstein (2012) indicates that the hospital is the most important institutional setting for the delivery of medical services because it represents "the largest single health care expenditure category," and it ...

Question competitive firms located in lesotho africa sell

Question: Competitive firms located in Lesotho (Africa) sell their tube socks only in Europe and theUnited States (which do not produce the good themselves). The industry's supply curve isupward sloping. a. Show the init ...

Question - suppose you are drawing cards out of a 30 card

Question - Suppose you are drawing cards out of a 30 card deck. The following table reports the value of each type of card and the frequency of each type. Value Frequency 1 6 2 7 3 6 4 3 5 8 Are the card values discrete ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As