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
Change the shape fill color to Dark Red. It is the first option in the Standard Colors section of the color palette.
maxonik [38]
Is this a question ?
3 0
3 years ago
When entering a function or formula in a cell, which of the first character you must type?
lions [1.4K]
When entering a function or formula in a cell, which of the first character you must type =
3 0
3 years ago
Read 2 more answers
How do you protect the server from modification by non-root users?
Elis [28]

Answer:

We can protect the server from the modification by using the non root users in many ways as follows:

  • By modifying the PHP settings in the server and by using the configured file as, the configuration of the file is basically depend upon the linux and the PHP script.
  • By disabling the URL from the function of file handling that basically accept the local file as the parameters but it also accept the URL.  It can even now get to outer destinations by utilizing fsockopen or any of the CURL capacities.
  • The safe mode  of PHP is presumably probably the best alternative to secure your server however it very well may be prohibitive. Whenever initiated, experimental mode averts access to records not claimed by Apache and access to condition factors and execution of double projects are likewise debilitated.

4 0
3 years ago
The object-oriented database model supports _______________. that is, new objects can be automatically created by replicating so
Talja [164]
The answer is Inheritance! Hope this helps!
5 0
3 years ago
How will Information Technology Fundamental improve on nursing career.​
ratelena [41]

Answer:

One of the primary ways that informatics has changed nursing practice is through documentation. ... Health informatics is also an important part of care coordination in nursing. The ability to track staffing, workflow and communication can help nurses to identify areas where current processes can be improved.

3 0
2 years ago
Read 2 more answers
Other questions:
  • What can be determined from this selection? Check all that apply. The Tax Info worksheet is currently being viewed. There are th
    6·2 answers
  • Which term describes the distinct number of colors a graphic contains? (1 point)?
    10·1 answer
  • Computer hardware without computer software is useless while computer software without computer hardware is meaningless. Discuss
    10·1 answer
  • How do you make the task bar and e-mail read in larger print
    13·1 answer
  • Which is a circuit board located behind an LCD screen on a laptop?
    7·1 answer
  • Tom Daniels, an employee of a telecommunications company, is developing software that would enable customers to activate value-a
    7·1 answer
  • An organization is concerned with the amount of sensor data that is being generated locally, analyzed in the cloud, and returned
    6·1 answer
  • Is this statement true or false? You can apply only one of these at a time: underline, bold, or italics. true false
    5·1 answer
  • Please help with this coding question
    8·2 answers
  • Artificial intelligence (AI) and machine learning are especially important during which security information and event managemen
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!