Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Practice C programming prob The output from the program should be similar to the following if all of the data is entered incorrectly the first

Practice C programming prob

image text in transcribedimage text in transcribed

The output from the program should be similar to the following if all of the data is entered incorrectly the first time Enter umber of quarters fram 1 to 40 45 Enter mumber of quarters from 1 to 40 Enter the beginning -200 Enter the beginning 1000 Enter the interest rate percentage without the percent sign greater than 0% and less than/equal to 20% 25 Enter the interest rate percentage without the percent sign greater than 0% and less than/equal to 20% 5.25 You entered a principal balance of $1000.00 for 8 quarters at 5.25% interest Is this correct? (y) principal balance greater than 0 principal balance greater than 0 Enter number of quarters fram 1 to 40 Enter the beginning principal balance greater than 0 10000 Enter the interest rate percentage without the percent sign greater than 0% and less than/equal to 20% 5.25 You entered a principal balance of $10000.00 for 8 quarters at 5.25% interest Is this correct? (y) Beginning Interest Ending Balance Numbe r Earned Balance 10 000.00 $131.25 $10131.25 $132.97 10264.22$134.72 10398.94 $136.49 $10535.43 $138.28 1067 3.70 $140.09 $10813.80 $141.93 $10955.73 $143. 79 $10131.25 $10264.22 $10398.94 $10535.43 $10673.70 $10813.80 $10955-73 $11099.52 1 Have the user enter their beginning principal balance (must be a double greater than zero) 2. If not a double greater thanzero, have the user enter again. (Hint: Use a do-while loop) 3. Have the user enter their desired annual interest rate (must be a double greater tha n zero and less than20%) 4. If not a double greater tha n zero and less than 20%, have the user enter again. (Hint: Use ado-while loop) 5. Have the user enter their desired number of quarters (must be an integergreater than zero or less than or equal to 40) 6. f not an integer greater than zero and less than or equal to 40, have the user enter again. (Hint: Use a do- while loop) 7. Displayall of the information entered in steps 4-9 asseen in the display window below 8. Ask the user if all of the values are correct. If yes, proceed with step 12. If no, return to step4. (Hint: Use a do-while loop) Foreach quarter, calculate and display the beginning principal balance, the interest earned, and the final principal balance for the quarter using a for loop. Format the output to appearas U.S. currency with dollar sign and two digits to the right of the decimal. For example: The user entered 1000.00 for the beginning principal balance, 5.25 for the interest rate, and 8 for the number of quarters. 9. 10. Ask the user if another interest calculation is requires and to enter the characterY for yes. IfY is entered then restart the code from step 1, anything other than Y then exit. 11. Test your program with the input in the window bellow to see if the output is correct. 12. The output from this part of the program should be similar to the following if all of the data is entered correctly the first time: Enter rber of quarters fram 1 to 40 Enter the beginning principal balance greater than 0 1000 Enter the interest rate percentage without the percent sign gre ater than 0% and less than/equal to 20% 5.25 You entered a principal balance of $1000.00 for 8 quarters at 5.25% interest Is this correct? (y) Quarter Number Beginning Balance $1000.00 1013.13 1026.42 $1039.89 $1053.54 1067.37 $1081.38 $1095.57 Interest Ending Balance $1013.13 1026.42 $1039.89 Earned $13.13 $13.30 13.47 $13.65 $13.83 14.01 14.19 $14.38 2 10 53-54 $1067.37 $1081.38 $1095.57 $1109.95

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions