Page 1 of 1

***In C Please*** 9.6.2: Function with branch: Popcorn. Complete function PrintPopcornTime(), with int parameter bagOunc

Posted: Sun May 15, 2022 1:27 pm
by answerhappygod
***In C Please***
9.6.2: Function with branch: Popcorn.
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:

42 seconds
In C Please 9 6 2 Function With Branch Popcorn Complete Function Printpopcorntime With Int Parameter Bagounc 1
In C Please 9 6 2 Function With Branch Popcorn Complete Function Printpopcorntime With Int Parameter Bagounc 1 (67.47 KiB) Viewed 97 times
Complete function PrintPopcorn Time(), 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: 42 seconds D 1 test passed All tests passed 1 #include <stdio.h> 2 3 void PrintPopcornTime(int bagOunces) { 4 5 * Your solution goes here 6 7} 8 9 int main(void) { 10 int userOunces; 11 12 scanf("%d", &userOunces); 13 PrintPopcornTime(userOunces); 14 15 return 0; Run Feedback?