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
telo118 [61]
3 years ago
7

Using C++, complete function PrintPopcornTime(), with int parameter bagOunces, and void return type. If bagOunces is less than 2

, print "Too 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 = 7:42 seconds1 #include 2 using namespace std; 34 void PrintPopcornTime(int bagOunces) { 56 /* Your solution goes here */ 78 } 9 int main() { 10 int userOunces; cin >> userOunces; 11 PrintPopcornTime12 13 return 0; 14 }
Computers and Technology
1 answer:
victus00 [196]3 years ago
3 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 << 6 * bagOunces <<" seconds" << endl;

}

int main()

{

   int userOunces;

   cin >> userOunces;

   PrintPopcornTime(userOunces);

   return 0;

}

Explanation:

Inside the function PrintPopcornTime, check the parameter bagOunces using if structure. Depending on the value of bagOunces, print the required information.

Inside the main, ask the user for the userOunces. Call the PrintPopcornTime function with the userOunces.

You might be interested in
One modeling technique drawn from systems analysis and design that can provide an excellent way to illustrate how a business fun
stealth61 [152]

Answer:

collaboration diagram

Explanation:

Collaboration diagram -

It refers to the diagram , which showcase the link between the unified modeling language with the software object , is referred to as the collaboration diagram.

It is also called the communication diagram .

These diagram are very important for a company as it is the  pictorial representation.

Various software are used to make these diagrams.

5 0
3 years ago
Im trying to figure out how to write a program that finds prime factors of a number. I have the following but it only works for
Paladinen [302]
The reason your program isn't working is because you put the n=12 now when you put the other n's in the code it causes it to only work with the number 12
7 0
4 years ago
What query class will you choose<br> for this query "women are evil"?
nikklg [1K]

Answer:

A) Gibberish or Vague Profane

Explanation:

Hope this helps

7 0
2 years ago
PLZ HELP 100 points!!!! 1. Imagine you are a screenplay writer. Discuss some possible activities or techniques you
atroni [7]

Answer:

One angle

Explanation:

I have seen several scripts with various directions such as "Close on" "from another angle", etc. And other scripts without such notations. I have seen conflicting comments concerning this practice---Some producers I have contacted say they want this IN the "finished script" they get and others, feel, like I do, that camera angles and lighting and such are up to the director in the production phase. I have also read that Spec Scripts do not have such notations. So what should I include or not, in this respect, in a Spec Script.

5 0
4 years ago
Why is fluency in information technology becoming increasingly important for many college majors?
never [62]
I think the answer to your question is opt. D
5 0
3 years ago
Read 2 more answers
Other questions:
  • A data structure used to bind an authenticated individual to a public key is the definition of ________.
    14·1 answer
  • Network firewall entry and exit points are called
    6·1 answer
  • William would like to sort a list of items after the data is already entered.
    9·1 answer
  • Tanya is entering the amount of money she has earned from babysitting onto an Excel spreadsheet, but the AutoComplete feature is
    9·2 answers
  • Having network users login with a username and password is an example of:
    12·1 answer
  • What is the first step that you should undertake when performing a visual analysis of a work of art?
    6·2 answers
  • How many questions do you need to have on brainly before being able to send messages?
    14·1 answer
  • _______________ ________________ have human editors that evaluate, select, and organize websites into a hierarchy of categories.
    11·1 answer
  • FIRST ANSWER GETS BRAINLIEST IM GIVING 30 POINTS!!!! Select the correct answer. Emma's project team has to create an application
    12·1 answer
  • The price of an item you want to buy is given in dollars and cents. You pay for it in cash by giving the clerk d dollars and c c
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!