1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
nalin [4]
3 years ago
9

Write a program that determines the price of a movie ticket (similar to the one in the chapter). The program asks for the custom

er's age and for the time on a 24-hour clock (where noon is 1200 and 4:30PM is 1630). The normal adult ticket price is $8.00, however the adult matinee price is $5.00. Adults are those over 13 years. The normal children's ticket price is $4.00, however the children's matinee price is $2.00. Assume that a matinee starts at any time earlier than 5pm (1700).
Computers and Technology
1 answer:
goblinko [34]3 years ago
6 0

Answer:

#include <iostream>

using namespace std;

int main() {

int age,time;

float price;

cout<<"Enter age:";

cin>>age;

cout<<"Enter time(in 24 hour clock for noon 1200):";

cin>>time;

if(age>13){

if(time<1700){

price=5;

}else{

price=8;

}

}else{

if(time<1700){

price=2;

}else{

price=4;

}

}

cout<<"Price: $"<<price<<endl;

}

Explanation:

Okay, here are the steps to be taken in order to be able to Write a program that determines the price of a movie ticket as given in details in the question above. Therefore, checked the steps below;

==> Input the age and the time.

==> If the age is not greater than 13, input the time(that is <1700) and follow it by imputing the price.

And if the age is greater than 13, you will also need to input the price. Just as below;

#include <iostream>

using namespace std;

int main() {

int age,time;

float price;

cout<<"Enter age:";

cin>>age;

cout<<"Enter time(in 24 hour clock for noon 1200):";

cin>>time;

if(age>13){

if(time<1700){

price=5;

}else{

price=8;

}

}else{

if(time<1700){

price=2;

}else{

price=4;

}

}

cout<<"Price: $"<<price<<endl;

}

You might be interested in
Construct a SQL query that displays a list of colleges, their sity/state, the accrediting agency, and whether or not the school
Alex787 [66]

Answer:

SELECT college, city_state, accre_agency, distance LIMIT 10

Explanation:

Given

Table name: College

See attachment for table

Required

Retrieve top 10 college, state, agency and school distance from the table

To retrieve from a table, we make use of the SELECT query

The select statement is then followed by the columns to be selected (separated by comma (,))

So, we have:

SELECT college, city_state, accre_agency, distance

From the question, we are to select only first 10 records.

This is achieved using the LIMIT clause

i.e. LIMIT 10 for first 10

So, the complete query is:

SELECT college, city_state, accre_agency, distance LIMIT 10

6 0
3 years ago
What were the advantages and disadvantages of agricultural technology to us.
Digiron [165]

Advantages of technology in agriculture include expediting crop production rate and crop quantity, which in turn reduces costs of production for farmers and food costs for consumers, and even makes crops more nutritious and livestock bigger and meatier.

The excessive use of chemicals by the help of machines reduces the fertility of the land.Lack of practical knowledge the farmers cant handle the machines properly.While the cost of maintenance is very high.Overuse of machines may lead to environmental damage.It is efficient but has many side effects and drawbacks.

5 0
3 years ago
Read 2 more answers
You have important data on your hard drive that is not backed up and your Windows installation is so corrupted you know that you
love history [14]

Answer:

Make every attempt to recover the data

Explanation:

If your decide to format the drive, use system restore or reinstall the windows OS you may end up loosing all your data so the best option is to try as much as you can attempting to recover the data because the data might or definitely will be lost while using other options you think are available.

8 0
3 years ago
What kind of Encryption is this:
VMariaS [17]

The Encryption of a website

4 0
3 years ago
Enter a formula in cell C13 to look up the registration fee for the first vehicle. Use the vehicle type in cell C4 as the Lookup
UNO [17]

The formula that depicts the registration fee on the computer is Formula at C13 : =VLOOKUP(C4,Data!$B$10:$C$17,2,0)

<h3>How to illustrate the information?</h3>

A computer program is a sequence or set of instructions in a programming language for a computer to execute.

Computer programs are one component of software, which also includes documentation and other intangible components. A computer program in its human-readable form is called source code

In this case, enter a formula in cell C13 to look up the registration fee for the first vehicle.

Then, one can use the vehicle type in cell C4 as the Lookup_value argument and then use the RegistrationFees named range as the Table_array argument.

Learn more about computer on:

brainly.com/question/24540334

#SPJ1

7 0
2 years ago
Other questions:
  • Which software is used to play, create, and modify audio and video files?
    13·2 answers
  • Write a function which the counts the number of odd numbers and even numbers currently in the stack and prints the results.
    6·1 answer
  • Desktop publishing design tools are represented by
    11·1 answer
  • Consider the formula: G=D+(A+C^2)*E/(D+B)^3 Show the order that a processor would follow to calculate G. To do so, break down th
    10·1 answer
  • A struggle between opposing forces or characters is
    14·1 answer
  • A file that is 242 megabytes is being downloaded. if the download is 15.4% complete, how many megabytes have been downloaded? ro
    5·1 answer
  • What is a computer system?
    9·1 answer
  • Write a program that takes a point (x,y) from theuser and find where does the point lies. The pointcan
    8·1 answer
  • Which is not one of the four criteria for proving the correctness of a logical pretest loop construct of the form: while B do S
    14·1 answer
  • How to write my name in binary code ? Rivas
    7·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!