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
White raven [17]
2 years ago
5

Complete function PrintPopcornTime(), with int parameter bagOunces, and void return type. If bagOunces is less than 2, print "To

o small". If greater than 10, print "Too large". Otherwise, compute and print 6 * bagOunces followed by " seconds". End with a newline. Example output for ounces.1 #include 2 using namespace std; 34 void PrintPopcornTime (int bagOunces)5 6 Your solution goes here 10 int main) 7891011 PrintPopcornTime(7) 12 13 return 0 14
Computers and Technology
1 answer:
Ludmilka [50]2 years ago
4 0

Answer:

#include <iostream>

using namespace std;

void PrintPopcornTime (int bagOunces){

   if (bagOunces < 2){

       cout << "Too small"<<endl;

   }

   else if (bagOunces > 10){

       cout << "Too large"<<endl;

   }

   else{

       cout << bagOunces*6 <<" seconds"<<endl;

   }

}

int main(){

   PrintPopcornTime(7);

   

   return 0;

}

Explanation:

Create a function called PrintPopcornTime that takes one parameter, bagOunces

Check the bagOunces using if-else structure. If it is smaller than 2, print "Too small". If it is greater than 10, print "Too large". Otherwise, calculate and print 6*bagOunces followed by " seconds".

Call the function in the main function with parameter 7. Since 7 is not smaller than 2 or not greater than 10, "42 seconds" will be printed.

You might be interested in
You have repaired a broken LCD panel in a laptop computer. However, when you disabled the laptop, you bent the hinge on the lid
Alex787 [66]
Yes it would take a second or todo
8 0
3 years ago
Which if the following is an effect of intellectual property theft?
Leno4ka [110]
Record companies lose money because people download songs for free.
8 0
3 years ago
Read 2 more answers
What unit is used to describe the smallest amount of bitcoin?
diamong [38]

Answer:

The satoshi is currently the smallest unit of the bitcoin currency recorded on the block chain. It is a one hundred millionth of a single bitcoin (0.00000001 BTC).

Explanation:

A bitcoin is a type of digital currency in which a record of transactions is kept and new units of currency are generated by the computational solution of mathematical problems. Bitcoins operate independently through a central bank.

7 0
3 years ago
The keyboard shortcut to save a file is _______.<br><br> Ctrl-s
asambeis [7]
Yes its Ctrl + S and if you want to save as press F12
8 0
3 years ago
Does the USA share the F-22 raptor technology with anyone else?True or False?
Brilliant_brown [7]

Answer:

False

Okay now I have to go to my school--

8 0
3 years ago
Read 2 more answers
Other questions:
  • Which of the following would an interactive media proffessional must likely need
    9·1 answer
  • HELP AS SOON IS A UNIT TEST WILL GIVE BRAINLIEST
    9·2 answers
  • ANSWER ME PLS
    9·1 answer
  • What feature of a word processing program helps you to easily check and correct spelling mistakes?
    9·1 answer
  • What type of engineer works on cleaning up oil spills?
    8·2 answers
  • The __________ assumption necessary for a linear programming model to be appropriate means that the contribution to the objectiv
    6·1 answer
  • i set up an account and paid the yearly fee, now it's asking me to join. i've tried to log in and brainly isn't accepting my ema
    8·1 answer
  • Give a recursive algorithm that takes as input a string s, removes the blank characters and reverses the string. For example, on
    7·1 answer
  • In the space provided, analyze the pros and cons of becoming a member of an artistic guild. Your answer should be at least 150 w
    12·1 answer
  • What’s cloud-based LinkedIn automation?
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!