Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

NOTE: CODE MUST BE WRITTEN IN C LANGUAGE WITHOUT ANY ERRORS! DO WHAT THEY ASK IN SAMPLE RUN! The program is to calculate the total

NOTE: CODE MUST BE WRITTEN IN C LANGUAGE WITHOUT ANY ERRORS! DO WHAT THEY ASK IN SAMPLE RUN!

The program is to calculate the total price of admission, to a theater, for a group of children Or a group of adults.

The price of a single ticket is $7.50 for a child and $12.50 for an adult The 'age' is expressed using a single letter: c(or C) for a child and a(or A) for an adult.

You are to complete the missing code so that the program produces results that are similar to those shown in the sample run

Sample run 1: Enter c(or C) for child, a(or A) for adult: A Enter number of persons in the party: 10 Total admission price = $125.00

--- Sample run 2: Enter c(or C) for child, a(or A) for adult: c Enter number of persons in the party: 7 Total admission price = $52.50

--- Sample run 3 Enter c(or C) for child, a(or A) for adult: m Enter number of persons in the party: 5 Age entered is not valid.

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_2

Step: 3

blur-text-image_step3

Ace Your Homework with AI

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

Get Started

Students also viewed these Databases questions

Question

d. How were you expected to contribute to family life?

Answered: 1 week ago