rewrite your program.
get the input for your program: amountentered
print your 3 column titles(including a newline)
first number is the count variable
second variable is 2 to the (n-1) power
third is the total
it can get confusing to try to sort it out. when it does i often just rewrite that section. try this:
Code:
double var2=input; //input is the amount entered
double var3=var2;
//print titles, variables at day one
for (int count=2;count<max_days+1;count++)
{
var2*=2;
var3+=var2;
//print these variables out
}
x*=y means x=x*y
x+=y means x=x+y
you should be able to figure out the input/output parts