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

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899604
Joined: Mon Aug 02, 2021 8:13 am

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

Post 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 95 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?
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply