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
Which writing format is also beneficial to public speaking? a. Five paragraph essay c. Conventions b. Prose d. None of these
garri49 [273]
convention writing is beneficial to public speaking because writing conventions such as spelling,punctuation,capitalization and grammar help make a student content clear and understandable audience can finish reading without having to stop to try to figure out what was actually intended,the value of learning these writing becomes clear.<span />
4 0
3 years ago
Read 2 more answers
Software that helps run the computer's hardware devices and coordinates instructions between applications is called
Inessa [10]

The question above contains multiple choices;

<span>a.       </span>Application

<span>b.      </span>Recovery

<span>c.       </span>Backup

<span>d.      </span>System

The answer is d) System software.


The system software consists of the operating systems and utility programs which are usually preinstalled. The operating system controls how a PC system functions. Utility programs, on the other hand, perform general tasks for the computer like system maintenance and file compression.








7 0
4 years ago
Fred is a 29 year old golfer, who has been playing for 4 years. He is a 12 handicap. He is considering the Srixon ZX5 or the Mav
STALIN [3.7K]

Answer:

oh nice yes good fine I like it

5 0
3 years ago
Write a function is_rightangled which, given the length of three sides of a triangle, will determine whether the triangle is rig
Olenka [21]

Answer:

Written in Python:

def is_rightangled(a,b,c):

     if abs(c**2 - (a**2 + b**2) < 0.001):

           return "True"

     else:

           return "False"

       

a = float(input("Side 1: "))

b = float(input("Side 2: "))

c = float(input("Side 3: "))

print(is_rightangled(a,b,c))

Explanation:

The function is defined here

def is_rightangled(a,b,c):

The following if statement implements Pythagoras theorem c^2 = a^2 + b^2 by checking if the left hand side is approximately equal to the right hand side

<em>      if abs(c**2 - (a**2 + b**2) < 0.001):</em>

<em>            return "True"</em>

<em>      else:</em>

<em>            return "False"</em>

If the specified condition is met, the if function returns true; Otherwise, it returns false.

The main function starts here

The next three line prompts user for the sides of the triangle

<em>a = float(input("Side 1: "))</em>

<em>b = float(input("Side 2: "))</em>

<em>c = float(input("Side 3: "))</em>

The next line calls the defined function

print(is_rightangled(a,b,c))

5 0
3 years ago
Please help!!
Mashutka [201]

Answer:

The first and last variable

Explanation:

3 0
3 years ago
Other questions:
  • The most popular input device of a computer is a(n) ____.
    6·1 answer
  • Sizing handles are used in Microsoft® Word® to _____.
    13·1 answer
  • The code below uses the Space macro which simply displays the number of blank spaces specified by its argument. What is the firs
    9·1 answer
  • Plot absorbance versus concentration in μmol/L of the Tartrazine solution at the wavelength of the maximum absorbance of Allura
    10·1 answer
  • A predictive data analyst ___
    11·1 answer
  • A network administrator was testing an IPS device by releasing multiple packets into the network. The administrator examined the
    13·2 answers
  • Fatima wants to compose and send an email in Outlook. Order the steps she needs to follow to do this task.
    10·2 answers
  • Heya! I’m quite lonely, so here are some points. I want to play some mc with others but the only version I’m able to play is edu
    11·2 answers
  • First Computers and Technology question in 4 years..
    11·1 answer
  • On March 2, 2022, is birthday wish me a happy birthday
    12·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!