***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
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?
***In C Please*** 9.6.2: Function with branch: Popcorn. Complete function PrintPopcornTime(), with int parameter bagOunc
-
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
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!