Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Use program TicketPrice for exercises 6-7. Thank you for your help. language is C++ Exercise 6: Add two else-if statements so that children 4 to

Use program TicketPrice for exercises 6-7. Thank you for your help.

language is C++

image text in transcribed

Exercise 6: Add two else-if statements so that children 4 to 12 years old (including 4 and 12) only need to pay $20 for ticket and senior citizens 65 or above only need to pay $30 for ticket. Run your program using the following values as input: 2, 4, 12, 37, 65, 71. Show the statements you added and the results for the input values in the report. Note: Remove any redundant condition in the logical expressions you wrote for this exercise, otherwise you may only earn partial credit even if the results are correct.

Exercise 7 : Exercise 7. Replace the following statement in Exercise 6 cout // Program TicketPrice prints the price for a ticket to // the Wonderland park based on an age input from the keyboard #include using namespace std; int main() int age; cout > age; if ( age

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

Step: 3

blur-text-image

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

MySQL Crash Course A Hands On Introduction To Database Development

Authors: Rick Silva

1st Edition

1718503008, 978-1718503007

More Books

Students also viewed these Databases questions