![10040816](/avatars/37481.jpg)
10040816
23.03.2020 •
Engineering
Complete function PrintPopcornTime(), with int parameter bagOunces, and void return type. If bagOunces is less than 3, 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:
Solved
Show answers
More tips
- S Sport How does Bodyflex work: what is it and how does it work?...
- O Other What is the oldest joke ever told?...
- F Food and Cooking How to Make Lazy Cabbage Rolls? Simple Steps to a Delicious Dish...
- F Food and Cooking Unusually Delicious Shashlik - Follow the Etiquette of Proper Preparation!...
- L Leisure and Entertainment Couchsurfing: A New Way to Travel...
- G Goods and services Which TV is better - LCD or Plasma?...
- S Sport How to Learn to Pull Up on Monkey Bars?...
- L Leisure and Entertainment Scrapbooking: What is it and Why is it Becoming More Popular?...
- C Computers and Internet Where did torrents.ru move to?...
- B Business and Finance Understanding Cash Flow: What It Is and How It Works...
Answers on questions: Engineering
- E Engineering An engineer devises a scheme for extracting some power from waste process steam. The engineer claims that the steam enters the device at 340 F and quality 75%, and exits...
- E Engineering Atrapezoidal channel with a sluice gate has the following characteristics: flow rate q = 25 m3/s; channel bottom slope s0 = 0.001 m/m; channel bottom width b = 10 m, the...
- L Law compare and contrast the significance of foreign affairs to the unites states at the time of its founding with its significance today...
- E English 1 paragraphs about pink...
- M Mathematics Plz help (5 x 10^3)(3.5 x 10^-1...
- E English Romiette and Julio At the police station, Cornell Cappelle left in a hurry to A get the information on the eleven o clock news. B) help the injured survivors. C) meet the...
- M Mathematics Which equation is an identity? 0 304-1) = x + 2(x + 1) + 1 OX - 4(x + 1) = 3(x + 1) + 1 O 2x + 3 = } (4x + 2) + 2 (6x - 3) = 3x + 1) – * - 2...
- F French Quel est la traduction de « gâcher » dans la phrase « Alors vous allez tout gâcher pour tout le monde » ? to joke to start to ruin to end...
- M Mathematics hel Describe a series of transformations that would take Triangle ABC to it s image Triangle A B C (shaded in green). Think about what information you need to include when...
- G Geography The map shows the distribution of dairy farms across the Lower 48 of the United States. Each dot on the map represents approximately ten dairy farms....
Ответ:
#include <iostream>
using namespace std;
void PrintPopcornTime(int bagOunces) {
if(bagOunces < 3){
cout << "Too small";
cout << endl;
}
else if(bagOunces > 10){
cout << "Too large";
cout << endl;
}
else{
cout << (6 * bagOunces) << " seconds" << endl;
}
}
int main() {
PrintPopcornTime(7);
return 0;
}
Explanation:
Using C++ to write the program. In line 1 we define the header "#include <iostream>" that defines the standard input/output stream objects. In line 2 "using namespace std" gives me the ability to use classes or functions, From lines 5 to 17 we define the function "PrintPopcornTime(), with int parameter bagOunces" Line 19 we can then call the function using 7 as the argument "PrintPopcornTime(7);" to get the expected output.
Ответ:
on some kill got s bad little b on the pill