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
Your Windows client systems are joined to the WestSim domain. To ensure correct time stamps are used, you need to verify that th
natita [175]

<u>Full question:</u>

Your Windows 7 client systems are joined to the WestSim.com domain. To ensure correct time stamps are used, you need to verify that these clients are configured for the appropriate time zone.

Which command can you use to do this?

• w32tm /tz

• w32tm /monitor

• w32tm /register

• w32tm /query /status

<u>Answer:</u>

w32tm /tz command can you use to do this

<u>Explanation:</u>

W32tm.exe is the approved command-line mechanism for configuring, monitoring, or troubleshooting the Windows Time service. This mechanism is a portion of the default connection between Windows and Windows Server. One can use W32tm.exe to configure Windows Time service settings and to diagnose time setting obstacles.

The syntax is W32tm </parameter> </param2>. w32tm /tz will represent contemporary time zone settings. The Windows Time service is not a full-featured NTP clarification that convenes time-sensitive reinforcement requirements, and it is not verified by Microsoft as such.

6 0
3 years ago
We use _____command to get data from the user? (python)
Genrish500 [490]

Answer:

INPUT

Explanation:

EXAMPLE PYTHON CODE

_______________________________________________________

INPUT CODE:

_______________________________________________________

foo = input('foo: ')#Have some text printed before the input field

bar = foo

print(bar)

_______________________________________________________

OUTPUT CODE:

_______________________________________________________

foo: Hello World!

Hello World!

>>> bar

'Hello World!'

>>>foo

'Hello World!'

5 0
3 years ago
Which of the following is the correct style tag for having the web page's text be aligned to the right?
uysha [10]

Answer:

B. style=text-align: right

Explanation:

text-align is a CSS property having 5 types of values. Each of values define below.

left - Aligns content to left.

right - Aligns content to right.

center - Centers the content.

justify - Depends on the width of the content, it will align itself to both left and righ

inherit - It specifies the the value of text-align should be taken from parent element.

8 0
3 years ago
Read 2 more answers
Which of the following URL extensions indicate the website is used by a college or university?
Svetllana [295]
The answer is (D) - .edu
4 0
3 years ago
Read 2 more answers
A(n) ____ is a secure, private path across a public network that is set up to allow authorized users private, secure access to t
yKpoI14uk [10]
It's VPN(Virtual Private Network). It allows company to have private network at the same time secure. While others are not that secure.
4 0
3 years ago
Other questions:
  • How do IT security workers help business
    5·1 answer
  • You have been asked to delete some data from medisoft but find that there is no delete button. what is another method you can us
    10·1 answer
  • Differentiate between third and fourth generation of computer​
    6·1 answer
  • What is the energy conversion of solar water heaters?
    12·1 answer
  • Which of the following statements is true of intrapreneurs
    15·1 answer
  • When it comes to the best possible security for your wireless router, be sure to use WEP encryption to ensure that your transmis
    14·1 answer
  • #Write a function called alter_list. alter_list should have#two parameters: a list of strings and a list of integers.##The list
    11·1 answer
  • Activities called ___________ involve the microprocessor receiving commands as software carries out tasks and while input arrive
    7·1 answer
  • Miriam Is a network administrator. A few employees want to access sensitive Information stored on a backup device. She wants to
    13·1 answer
  • In addition to reduced power consumption, what is an advantage of using hyperscale cloud computing data centers?
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!