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]
3 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]3 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
Given an unsorted std::vector and a number n, what is the worst-case time complexity for finding the pair of integers whose sum
kari74 [83]

Answer:A

Explanation:

8 0
4 years ago
Consider the following two code segments, which are both intended to determine the longest of the three strings "pea", "pear", a
Alexxandr [17]

Answer:

Code segment II produces correct output for all values of str, but code segment I produces correct output only for values of str that contain "pea" but not "pear".

Explanation:

The main issue with the first code segment is the way how the if else if condition are arranged. The "pea" is checked at the earliest time in the first code segment and therefore so long as there is the "pea" exist in the string (regardless there is pear or pearl exist in the string as well), the if condition will become true and display "pea" to terminal. This is the reason why the code segment 1 only work for the values of str that contain "pea".

8 0
3 years ago
Explain FOFC).<br>Explain how while<br>NOT EOFC ) works​
Oksi-84 [34.3K]

Answer:

D

Explanation:

8 0
3 years ago
When adding a new record, which key can be pressed to move to the next field?
Anika [276]

Answer:

O Tab

Explanation:

In order to add a new record the key that should be used to move to the next field is tab key

while the other keys are used for the other purpose

But for adding a new field, new record, a tab key should be used

Therefore the last option is correct

8 0
3 years ago
What is the best list to use to speed up a research plan
iren2701 [21]

Answer:

Well here is what I got

Explanation:

1. Title

2. Abstract or summary

3. Background, context or rationale

4. Aims and objectives

5. Hypothesis

6. Literature review

7. Research design and methods

8. Ethical issues

9. Project timetable

10. Deliverables, outputs and outcomes

11. Risk assessment

12. Resources and costs

13. Project evaluation

14. References

15. Appendices

Hope I helped. Pls mark mine as brainliest

6 0
3 years ago
Other questions:
  • Windows uses a memory-management technique known as ________ to monitor which applications you frequently use and preloads them
    15·1 answer
  • John is selling his pizza for $6 per slice in an area of high demand. However, customers are not buying his pizza.
    9·2 answers
  • Jamie is writing an investigative report with footnotes
    9·2 answers
  • Chris needs to create a simple web page with HTML. Which tool will he use? HyperText Web browser Text editor Operating software
    10·1 answer
  • our client, Rhonda, has come to you for advice. Rhonda has recently graduated from college and has a good job with a large compa
    6·1 answer
  • Write a program that computes the minimum, maximum, average and standard deviation of the population over time for a borough (en
    6·1 answer
  • Technology deals with...
    12·1 answer
  • You construct a simple electrical current to boil water for tea. A battery generates positive and negative charges. A wire conne
    13·1 answer
  • The contribution of Charles Babbage in the history of computer​
    6·1 answer
  • web browsers save website information in their _________, which helps the site load faster on future visits.
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!