Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Unlimited Attempts Allowed Details Introduction Control flow statements form the basis of all programming tasks. You will find yourself using if statements, for - loops

Unlimited Attempts Allowed
Details
Introduction
Control flow statements form the basis of all programming tasks. You will find yourself using if statements, for-loops and while-loops throughout your
programming career. This week we will use our if statements and loops to build a simple future value calculator that will tell the user their expected
account balance and interest earned each year.
Expectations
Your program should do the following tasks:
Ask user for their initial investment, expected interest rate, and the number of years they plan to invest
Print an error message if any of these inputs are negative or non-numerical values
Print the annual interest and balance to the screen for each year from 1 to N, where N is the number of years the investor plans to invest
Print the ending balance and a message indicating this will be the final balance
Ask the user if they want to continue (i.e. re-run the program using new inputs)
(Optional-Extra Credit) Add functionality to the calculator that allows the user to add a fixed additional principal amount to their account each year
image text in transcribed

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

Recommended Textbook for

Databases On The Web Designing And Programming For Network Access

Authors: Patricia Ju

1st Edition

1558515100, 978-1558515109

Students also viewed these Databases questions

Question

What are the purposes of promotion ?

Answered: 1 week ago

Question

Define promotion.

Answered: 1 week ago

Question

Write a note on transfer policy.

Answered: 1 week ago