Question: Modify the program so it uses a named constant in place of 0 . 0 4 9 . 6 . Run the program and test

Modify the program so it uses a named constant in place of 0.049.
6. Run the program and test it to see if it gives the same values.
7. Modify the interest rate to 0.059.
8. Run the program again and test it to see the values it gives have changed.
9. Did you change the output, so it now says 5.9%? If not make that change and run the
program again.
10. Since it would be easier not to have to change the program in two places, declare a
new double variable called percent and set its value to 100 times the interest rate.
11. Modify your output statement so it uses the percent variable instead of 5.9.
12. Run the program again and test it to make sure it still works properly.
13. Add some additional statements to compute what the balance will be after a second
year of earning interest and display this result along with the original result

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 Programming Questions!