Question

Unused if (children >= 3) else if (adults >= 1) { if (adults + children >= 10) { cout << "Buy only individual tickets" << endl; } { cout << "Buy only individual tickets" << endl; } { cout << "Buy group pass" << endl; } { cout << "Buy family pass" << endl; } main.cpp #include <iostream> using namespace std; int main() { int adults; int children; cin >> adults; cin >> children; return 0; } Loa

          Unused
if (children >= 3)
else if (adults >= 1)
{
if (adults + children >= 10)
{
cout << "Buy only individual tickets" << endl;
}
{
cout << "Buy only individual tickets" << endl;
}
{
cout << "Buy group pass" << endl;
}
{
cout << "Buy family pass" << endl;
}
main.cpp
#include <iostream>
using namespace std;
int main()
{
int adults;
int children;
cin >> adults;
cin >> children;
return 0;
}
Loa
        
Show more…
Unused
if (children >= 3)
else if (adults >= 1)

if (adults + children >= 10)

cout << "Buy only individual tickets" << endl;


cout << "Buy only individual tickets" << endl;


cout << "Buy group pass" << endl;


cout << "Buy family pass" << endl;

main.cpp
#include <iostream>
using namespace std;
int main()

int adults;
int children;
cin >> adults;
cin >> children;
return 0;

Loa

Added by Richard E.

Close

Computer Science and Information Technology
Computer Science and Information Technology
Trishna Knowledge Systems 2018 Edition
AceChat toggle button
Close icon
Ace pointing down

Please give Ace some feedback

Your feedback will help us improve your experience

Thumb up icon Thumb down icon
Thanks for your feedback!
Profile picture
Unused if (children >= 3) else if (adults >= 1) { if (adults + children >= 10) { cout << "Buy only individual tickets" << endl; } { cout << "Buy only individual tickets" << endl; f { cout << "Buy group pass" << endl; } { cout << "Buy family pass" << endl; main.cpp #include ≫≫ Unused main.cpp Lo if children >= 3) #include <iostream> using namespace std; else if adults >= 1) int main) if adults + children >= 10) int adults; int children; cin >> adults; cin >> children; cout << "Buy only individual tickets" << endl; } cout << "Buy only individual tickets" << endl; } return 0; cout << "Buy group pass" << endl; } cout << "Buy family pass" << endl;
Close icon
Play audio
Feedback
Powered by NumerAI
David Collins Ivan Kochetkov
Jennifer Stoner verified

Aarya B and 57 other subject AP CS educators are ready to help you.

Ask a new question

*

Labs

-

Want to see this concept in action?

NEW

Explore this concept interactively to see how it behaves as you change inputs.

View Labs

*

Key Concepts

-
Key Concept
Premium Feature
Explore the core concept behind this problem.
Play button
Key Concept
Premium Feature
Explore the core concept behind this problem.
Your browser does not support the video tag.

*

Recommended Videos

-
cos151110212018-question1-question-1a-suppose-we-want-to-input-and-validate-the-age-of-students-that-qualify-for-an-internshipas-well-as-the-final-mark-obtained-for-the-examinationin-a-wh-i-32128

Aarya B.

the-program-you-will-develop-needs-to-accept-input-from-a-source-run-the-input-through-several-comparisons-and-then-calculate-an-output-you-will-use-variables-assignments-if-else-functions-a-54066

The program you will develop needs to accept input from a source, run the input through several comparisons, and then calculate an output. You will use variables, assignments, if-else functions, and arrays. In this scenario, you need to create a program that will take a user's age and determine a ticket price based on their age. The standard ticket price is $10.00. Minors (those under the age of 18) will pay $1.00 less than the standard ticket price. Seniors (those over the age of 65) will receive a 15% discount.

Cora M.

use-beginnerintermediate-knowledge-cout-ifelse-statements-functions-as-needed-programmer-defined-functions-it-is-desired-to-create-a-mortgage-estimator-by-writing-a-program-containing-a-func-21092

It is desired to create a mortgage estimator by writing a program containing a function. The user inputs the amount of loan (L), the loan term in number of months (N), and the annual interest rate (I). The program should make use of a function that accepts these values as inputs through its argument and calculates and returns the monthly payment and the total payments over the life of the loan. The monthly payment and the total payment could be calculated using the following expressions: monthly_payment = L / [(1 - (1 + I/12)^-N) / (I/12)] total_payment = N x monthly_payment Note that the interest rate must be expressed in decimal; for example, if the interest rate is 8% it must be entered as 0.08. Test your program for several scenarios and submit the results with the program listing. The values of L, N, I, monthly_payment, and total_payment should be written to a file as listed below: Loan Amount Months Interest Monthly Payment Total Payment 10000 36 0.06 .... 120000 120 0.05 .... 85000 60 0.07 .... 257000 360 0.08 .... 320000 180 0.05 ....

Akash M.


*

Recommended Textbooks

-
Computer Science and Information Technology

Computer Science and Information Technology

Trishna Knowledge Systems 2018 Edition
achievement 1,785 solutions
Introduction to Programming Using Python

Introduction to Programming Using Python

Y. Daniel Liang 1st Edition
achievement 1,562 solutions
Computer Science - An Overview

Computer Science - An Overview

Glenn Brookshear, Dennis Brylow 12th Edition
achievement 1,618 solutions

*

Transcript

-
00:01 In this question we have to write the code using the while loop.
00:03 So we are writing in the c language.
00:05 So we have hashtag include.
00:08 This has no spaces there.
00:10 So hashtag include.
00:13 This is studio .h htdio .h so now we are having integer main and integer age comma final mark which we write like this.
00:37 Then we have while.
00:39 We are putting the value 1.
00:41 So this is input age and final mark.
00:43 So we have that printf.
00:45 That is enter age of the student.
00:55 Then the age will be entered.
00:57 Then we have to scan this.
00:59 So this is scanf.
01:01 We have percent t comma end age.
01:09 Then we have to again do the printf.
01:13 Here we have to enter marks that is obtained.
01:21 Then what we have to do.
01:23 Again this is printf.
01:23 This is scanf.
01:24 This is percent t and final mark...
Need help? Use Ace
Ace is your personal tutor. It breaks down any question with clear steps so you can learn.
Start Using Ace
Ace is your personal tutor for learning
Step-by-step explanations
Instant summaries
Summarize YouTube videos
Understand textbook images or PDFs
Study tools like quizzes and flashcards
Listen to your notes as a podcast
Continue solving this problem
Create a free account to:
  • View full step-by-step solution
  • Ask follow-up questions with Ace AI
  • Save progress and study later
Continue Free
Numerade

Get step-by-step video solution
from top educators

Continue with Clever
or



By creating an account, you agree to the Terms of Service and Privacy Policy
Already have an account? Log In

A free answer
just for you

Watch the video solution with this free unlock.

Numerade

Log in to watch this video
...and 100,000,000 more!


EMAIL

PASSWORD

OR
Continue with Clever