Question: How to write in C programming On the first day you deposit a penny in the bank. On the second day you deposit two pennies.

 How to write in C programming On the first day you

How to write in C programming

On the first day you deposit a penny in the bank. On the second day you deposit two pennies. On the third day you deposit four pennies. On the fourth day you deposit eight pennies, etc. Assuming that you keep doubling your deposit each day, write a C program, penny.c, which determines how many days it will take or you to accumulate at least one million dollars. (Assume that no interest is paid.) Note that the amount to be accumulated must be input at run-time. For each day your output should include the amount of the deposit for that day as well as the total balance in the bank up to that day. Your output should appear in tabular format as shown below: Please enter the anount of money you want to accumulate: 1000000 DAY DEPOSIT BALANCE 0.01 0.02 0.04 0.08 0.01 0.03 0.07 0.15 It took XX days to accumulate at least $1000000.00 Your program should include a main function, a function to output the table header as well as a function to generate the table. The function that generates the table should be passed an input parameter of type double that tells how much money you want to accumulate. The function output should line up the columns by decimal place and should provide a return value to main() that tells how many days it took to accumulate the funds. This returned value should thern be output as shown above. Remember that the main() function should appear as the first function in the program. Be sure to use function prototypes for each of the functions that are used in your program. Output from your program should be sent to the terminal window (your screen) as well as the requested csis.txt output file. Be sure to read the document on Capturing Program Output. Your full name must appear as a comment in the source file that contains main(). Be sure to include the csis.txt output file in your zip archive

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!