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
in which of the following scenarios would a router send a resign message? answer if a preempted active router fails, the standby
hodyreva [135]

A scenario in which a router would send a resign message include the following: A. if a preempted active router fails, the standby router becomes the active router. If the preempted active router regains service, it sends a coup message. The current active router sends the resign message after receiving the coup message.

<h3>What is a router?</h3>

In Computer technology, a router can be defined as a network device (node) that is designed and developed to connect two (2) different computer networks together, in order to allow them communicate by forwarding and receiving encapsulated data (Ethernet frame) and packets.

<h3>What is a resign message?</h3>

In Computer networking, a resign message can be defined as a set of information that is typically sent by an active Hot Standby Router Protocol (HSRP) network device when it is preparing to go offline or whenever it wants to relinquish the active role due to some other reasons.

This ultimately implies that, a resign message instructs or informs a standby router to get ready to become the active router and take over the active role.

Read more on router here: brainly.com/question/24812743

#SPJ1

8 0
1 year ago
Jayden wants to take a current theme but just change a little bit of it. Complete the steps to help Jayden.
Georgia [21]

Answer:

Go to the  

✔ Page Layout

tab on the ribbon and the  

✔ Themes

group.

Click Themes and select one.

Go into the workbook, make the changes, and return to the Themes gallery.

Select  

✔ Save Current Theme

to save the changes.

Explanation:

yup

4 0
3 years ago
Which of these is NOT an example of a programming language?
777dan777 [17]
High level sorry if im wrong
7 0
3 years ago
Read 2 more answers
Write a program that accepts inputs, outputs them and exits correctly when - 1<br> is pressed
dolphi86 [110]

Answer:

Explanation:

The following program is written in Python. It simply creates an endless loop that continously asks the user for an input. If the input is not -1 then it outputs the same input, otherwise it exists the program correctly. A test output can be seen in the attached image below.

while True:

   answer = input("Enter a value: ")  

   if answer != "-1":

       print(answer)

   else:

       break

7 0
3 years ago
What is the minimum score for the dmv test?
Naddika [18.5K]
You can only get 6 wrong of the 30 questions.
3 0
4 years ago
Read 2 more answers
Other questions:
  • In Linux Operating System, what file extension is used forexecutable files?
    6·1 answer
  • What inventor patented the first America movie projector
    13·2 answers
  • Which is the correct formula to add the values in cells A1 and B1? A. SUM(A1+B1) B. =SUM(A1+B1) C. =SUMA1+B1 D. A1+B1
    9·2 answers
  • What is the standard markup language of the world wide web?
    14·1 answer
  • A computer’s BIOS is defined as the
    12·2 answers
  • A microphone is a type of electronic.<br><br> True/Faulse
    14·1 answer
  • What are the functions of online gaming communities?
    12·1 answer
  • Network access control authenticates users logging into the network and determines what data they can access and actions they ca
    7·1 answer
  • How much heat is required to convert 1 gm of ice into steam​
    12·1 answer
  • According the SDLC phases, which among these activities see a substantial amount of automation initiatives?
    12·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!