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
Once a software program has been through one test cycle performed by the programmers and is running proper
Lera25 [3.4K]
Yes, some may also say that they release it to the beta testers.

Occasionally, they release it to alpha testers before beta testers as another step.
8 0
3 years ago
dentify the type of observational study​ (cross-sectional, retrospective, or​ prospective) described below. A research company u
valentinak56 [21]

Answer:

A cross-sectional study  

Explanation:

Cross-sectional research in psychology is defined as using a variety of people who differ in the variable of interest but carries other characteristics as well, including educational background, ethnicity, socioeconomic status, etc. It is often used by a researcher who studies developmental psychology. it is used for population-based surveys and to assess the prevalence of disease. These studies are usually inexpensive and relatively faster.

5 0
3 years ago
What is one advantage of top-down programming design?
mojhsa [17]

Answer:

Programmers can take advantage of abstraction to focus on specific tasks.

Explanation:

When we excel in some subjects, we can do abstraction in that subject. Abstraction means you understand by the term, and you do not need details of that term. Like you say some tasks will be done by a graphic designer as a project manager, and you do not need to understand at that point what he will be doing, and that is because you can write in a word or few what is going to be the outcome. And hence, the programmers can take advantage of abstraction to focus on specific tasks. And this is the correct option.

5 0
3 years ago
Read 2 more answers
The arcade machine market crash in the 1980's because:
Blababa [14]

Answer:

C) A quarter was worth less than is used to be.

Explanation:

I got this answer wrong when I chose B.

7 0
3 years ago
What will be the output of the following lines of code and the user's response?
Arte-miy333 [17]

Answer:

The answer is C. 85

Explanation:

The int() function is usually used to turn a float, to an int<em>.</em> When you use the int() function, it just cuts of everything past the decimal. It doesn't round the float. Leaving you with the option C. 85

hope this helped you :D

6 0
2 years ago
Other questions:
  • What microsoft operating systems started the process of authenticating using password and username
    14·1 answer
  • Walking paths across the part is represented by the equation why equals -4x - 6​
    9·1 answer
  • 1.2 Discuss each of the following terms: (a) data (b) database (c) database management system (d) database application program (
    12·1 answer
  • Write a function named "higher_lower" that takes an int as a parameter and returns "higher" if 14 is greater than the input and
    11·1 answer
  • Presently we can solve problem instances of size 30 in 1 minute using algorithm A, which is a algorithm. On the other hand, we w
    8·1 answer
  • When classified data is sent over an unclassified network, what is this incident called?
    5·1 answer
  • Create detailed pseudocode for a program that calculates how many days are left until Christmas, when given as an input how many
    15·1 answer
  • _________________ ___________________ is an encrypted code that a person, website, or organization attaches to an electronic mes
    9·1 answer
  • How do you merge on excel?​
    5·1 answer
  • In a database, what term is used to describe a group of fields that are all associated with and accessed using single primary ke
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!