Question
#include void outputheader( ) { /* add code to output the table header */ /* --> between here */ /* --> and here */ }
#include
void outputheader( )
{
/* add code to output the table header */
/* --> between here */
/* --> and here */
}
int generatetable( /* add parameter here */ )
{
/* add declarations and code to generate the table (based on the parameter value) */
/* and return the number of days required to accumulate the specified amount */
/* --> between here */
/* --> and here */
}
int main( void )
{
/* add declarations and code to input the amount of money, */
/* call the function to output the table header, */
/* and call the function to generate the table,
/* and print the number of days required */
/* --> between here */
/* --> and here */
while( 1 ) getchar( );
return 0;
}
How do i start this?!
I need to find out how many days would it take to collect pennies to equal a certain amount of money.
My professor didn't explain much.
I do not know how to generate a table or what parameters to set.
The example output needs to be
DAY DEPOSIT BALANCE
--- ------- -------
1 0.01 0.01
2 0.02 0.03
3 0.04 0.07
4 1.08 0.15
5 0.16 0.31
6 0.32 0.63
7 0.64 1.27
8 1.28 2.55
9 2.56 5.11
10 5.12 10.23
11 10.24 20.47
12 20.48 40.95
13 555.55 666.66
14 6666.66 7777.77
15 77777.77 88888.88
16 888888.88 999999.99
17 999999.99 1234567.89
It took 17 days to accumulate at least $1000000.00.
I have no idea where to start.
Step 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