chrischris1
20.12.2019 •
Computers and Technology
What does it mean if my ninja blender power light is blinking?
Solved
Show answers
More tips
- H Health and Medicine Liver Cleansing - Rejuvenation for the Body?...
- L Leisure and Entertainment Scrapbooking: What is it and Why is it Becoming More Popular?...
- H Horoscopes, Magic, Divination How to Cast a Love Spell on a Guy? Guide for Guys...
- F Family and Home How to Sew Curtain Tapes: Best Tips from Professionals...
- S Style and Beauty How are artificial nails removed?...
- S Style and Beauty How to Make Your Lips Fuller? Ideas and Tips for Beautiful Lips...
- F Food and Cooking The Disease That Haunted Abraham Lincoln...
- C Computers and Internet How to Get Rid of Windows Genuine Check?...
- H Health and Medicine How to perform artificial respiration?...
- S Style and Beauty Tricks and Tips: How to Get Rid of Freckles...
Answers on questions: Computers and Technology
- C Computers and Technology Which of the following is the term for an economic and social inequality based on access to, use of, or knowledge of technology resources? digital divide achievement gap knowledge...
- C Computers and Technology This question is related to linked-list representation of disjoint sets. Consider two sets Sx and Sy that have 3 and 5 elements, respectively. A union (UNION(x,y)) of the sets...
- C Computers and Technology Which of these elements to orient a user? oa. a dialog a page name oc. an icon od. a banner...
- H History Analyze why the british strategy in the middle states failed to win the war even though the british won most of the battles and captured new york and philadelphia....
- E English Compare elie feeling at the time with the manner in which he celebrated rosh hashanah in the past...
- H History Who was usually responsible for making sure field work was completed by enslaved workers on plantations...
- B Biology How does the examples from redi, spallanzani, and pasteur experiments demonstrate science as a way of knowing...
- M Mathematics What is the difference of 2 3/8-1 7/8...
- M Mathematics At pizza hut you can get 9 slices of pizza for $7.00. what is the price per slice of pizza?...
- M Mathematics Evaluate the integral of xe^(-5x) dx using integrate by parts....
Ответ:
Ответ:
Ответ:
#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.