Question: 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.

Complete the C program, souffle_pancake.c. The main function has already been written,

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 flour

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!