Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Complete the C program, souffle_pancake.c. The main function has already been written, which help the user calculate how many resources they will need to cook
Complete the C program, souffle_pancake.c.
The main function has already been written, which help the user calculate how many resources they will need to cook any given amount of souffle pancakes!
Unfortunately due to a strange bug in the DCC Compiler, the math.h library has been acting up, so Paula has asked you to help her out and write some useful functions similar to those in that library.
Your job is to write 3 functions that are currently being used in the main function. They are: divide, ceiling and a helper procedure print_time.
is a function that divides two doubles. - function input: - a for the top of the divide - a for the bottom of the divide - function output: for the result is a function that rounds up a given double to the closest integer. If the value is already a whole number, it stays the same value. - function input: a for the number being ceiling-ed - function output: for the result is a procedure that given minutes, will print out the time in hours and minutes - function input: an for the cooking time in minutes - function output: - It will print the time in the format , even if either the minutes or hours is The output from your program should look exactly like this: \$ dcc souffle_pancake.c -o souffle_pancake $./souffle_pancake How many souffle pancakes do you want to make? 3 You will need: - 2 eggs 30g sugar - 24g flour Frying will take you 0 hours and 15 minutes. $./souffle_pancake How many souffle pancakes do you want to make? 5 You will need: - 4 eggs - 50g sugar - 40g flourStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started