Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Unlimited Attempts AllowedUnlimited Attempts Allowed Details Introduction Control flow statements form the basis of all programming tasks. You will find yourself using if statements, for
Unlimited Attempts AllowedUnlimited Attempts Allowed
Details
Introduction
Control flow statements form the basis of all programming tasks. You will find yourself using if statements, forloops and whileloops 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 nonnumerical values
Print the annual interest and balance to the screen for each year from to where 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 ie rerun the program using new inputs
OptionalExtra Credit Add functionality to the calculator that allows the user to add a fixed additional principal amount to their account each year
Details
Introduction
Control flow statements form the basis of all programming tasks. You will find yourself using if statements, forloops and whileloops 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 nonnumerical values
Print the annual interest and balance to the screen for each year from to where 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 ie rerun the program using new inputs
OptionalExtra Credit Add functionality to the calculator that allows the user to add a fixed additional principal amount to their account each year
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