SlideShare a Scribd company logo
1 of 2
Write a program that calculates the final value of a ten year, $10,000 investment whose annual
return gradually declines from 2% to 1% over that term
Solution
/Header file section
#include<iostream>
using namespace std;
//Program begins with a main function
int main()
{
//Initialize variables
double investment=10000, highIntrest=0.02,changeIntrest=0.01,years=10,result;
//prompt output
cout<<"Year "<<"Final_value "<<endl;
//Calculate the final value of a ten year
for(int i=1;i<=10;i++)
{
investment = (investment* highIntrest)+investment;
highIntrest=changeIntrest;
cout<<i<<"Â Â Â Â "<<investment<<endl;
}
cout<<"Final Value of a ten year="<<investment<<endl<<endl;
//Pause the system for a while
system("pause");
return 0;
}
Write a program that calculates the final value of a ten year- $10-000.docx

More Related Content

More from drosa1

Write a program to throw the InputMismatchException-Solutionimport jav.docx
Write a program to throw the InputMismatchException-Solutionimport jav.docxWrite a program to throw the InputMismatchException-Solutionimport jav.docx
Write a program to throw the InputMismatchException-Solutionimport jav.docxdrosa1
 
You are a security consultant for a company that has a location in Hou (1).docx
You are a security consultant for a company that has a location in Hou (1).docxYou are a security consultant for a company that has a location in Hou (1).docx
You are a security consultant for a company that has a location in Hou (1).docxdrosa1
 
You are a security consultant for a company that has a location in Hou (3).docx
You are a security consultant for a company that has a location in Hou (3).docxYou are a security consultant for a company that has a location in Hou (3).docx
You are a security consultant for a company that has a location in Hou (3).docxdrosa1
 
You are a security consultant for a company that has a location in Hou (2).docx
You are a security consultant for a company that has a location in Hou (2).docxYou are a security consultant for a company that has a location in Hou (2).docx
You are a security consultant for a company that has a location in Hou (2).docxdrosa1
 
You are a security consultant for a company that has a location in Hou.docx
You are a security consultant for a company that has a location in Hou.docxYou are a security consultant for a company that has a location in Hou.docx
You are a security consultant for a company that has a location in Hou.docxdrosa1
 
You and another tech are discussing the relative merits of SCSI interf.docx
You and another tech are discussing the relative merits of SCSI interf.docxYou and another tech are discussing the relative merits of SCSI interf.docx
You and another tech are discussing the relative merits of SCSI interf.docxdrosa1
 
Write a program in C++ that will return 1 if the elements of an n-elem.docx
Write a program in C++ that will return 1 if the elements of an n-elem.docxWrite a program in C++ that will return 1 if the elements of an n-elem.docx
Write a program in C++ that will return 1 if the elements of an n-elem.docxdrosa1
 
Write a java program that reads 10 integers from the keyboard and stor.docx
Write a java program that reads 10 integers from the keyboard and stor.docxWrite a java program that reads 10 integers from the keyboard and stor.docx
Write a java program that reads 10 integers from the keyboard and stor.docxdrosa1
 
writing formulas for compounds chart Writing Formulas for Compounds Ch.docx
writing formulas for compounds chart Writing Formulas for Compounds Ch.docxwriting formulas for compounds chart Writing Formulas for Compounds Ch.docx
writing formulas for compounds chart Writing Formulas for Compounds Ch.docxdrosa1
 
Write the expression as the logarithm of a single quantity- 1.docx
Write the expression as the logarithm of a single quantity-      1.docxWrite the expression as the logarithm of a single quantity-      1.docx
Write the expression as the logarithm of a single quantity- 1.docxdrosa1
 
Write and implement a recursive version of the binary search algorithm.docx
Write and implement a recursive version of the binary search algorithm.docxWrite and implement a recursive version of the binary search algorithm.docx
Write and implement a recursive version of the binary search algorithm.docxdrosa1
 
write a file declaration that holds text charaters and can be stored i.docx
write a file declaration that holds text charaters and can be stored i.docxwrite a file declaration that holds text charaters and can be stored i.docx
write a file declaration that holds text charaters and can be stored i.docxdrosa1
 
Write the equation in the slope-intercept form- Solution.docx
Write the equation in the slope-intercept form-       Solution.docxWrite the equation in the slope-intercept form-       Solution.docx
Write the equation in the slope-intercept form- Solution.docxdrosa1
 
Write the balanced neutralization reaction between H2S04 and KOH in aq.docx
Write the balanced neutralization reaction between H2S04 and KOH in aq.docxWrite the balanced neutralization reaction between H2S04 and KOH in aq.docx
Write the balanced neutralization reaction between H2S04 and KOH in aq.docxdrosa1
 
Write an outline for the following research paper topic- Managerial Ac.docx
Write an outline for the following research paper topic- Managerial Ac.docxWrite an outline for the following research paper topic- Managerial Ac.docx
Write an outline for the following research paper topic- Managerial Ac.docxdrosa1
 
write a vb program that uses a while loop that prompts a user to enter.docx
write a vb program that uses a while loop that prompts a user to enter.docxwrite a vb program that uses a while loop that prompts a user to enter.docx
write a vb program that uses a while loop that prompts a user to enter.docxdrosa1
 
Write a temperature conversion program that converts from Fahrenheit t.docx
Write a temperature conversion program that converts from Fahrenheit t.docxWrite a temperature conversion program that converts from Fahrenheit t.docx
Write a temperature conversion program that converts from Fahrenheit t.docxdrosa1
 
Write a function file in matlab that utilizes Eulers method to solve t.docx
Write a function file in matlab that utilizes Eulers method to solve t.docxWrite a function file in matlab that utilizes Eulers method to solve t.docx
Write a function file in matlab that utilizes Eulers method to solve t.docxdrosa1
 

More from drosa1 (18)

Write a program to throw the InputMismatchException-Solutionimport jav.docx
Write a program to throw the InputMismatchException-Solutionimport jav.docxWrite a program to throw the InputMismatchException-Solutionimport jav.docx
Write a program to throw the InputMismatchException-Solutionimport jav.docx
 
You are a security consultant for a company that has a location in Hou (1).docx
You are a security consultant for a company that has a location in Hou (1).docxYou are a security consultant for a company that has a location in Hou (1).docx
You are a security consultant for a company that has a location in Hou (1).docx
 
You are a security consultant for a company that has a location in Hou (3).docx
You are a security consultant for a company that has a location in Hou (3).docxYou are a security consultant for a company that has a location in Hou (3).docx
You are a security consultant for a company that has a location in Hou (3).docx
 
You are a security consultant for a company that has a location in Hou (2).docx
You are a security consultant for a company that has a location in Hou (2).docxYou are a security consultant for a company that has a location in Hou (2).docx
You are a security consultant for a company that has a location in Hou (2).docx
 
You are a security consultant for a company that has a location in Hou.docx
You are a security consultant for a company that has a location in Hou.docxYou are a security consultant for a company that has a location in Hou.docx
You are a security consultant for a company that has a location in Hou.docx
 
You and another tech are discussing the relative merits of SCSI interf.docx
You and another tech are discussing the relative merits of SCSI interf.docxYou and another tech are discussing the relative merits of SCSI interf.docx
You and another tech are discussing the relative merits of SCSI interf.docx
 
Write a program in C++ that will return 1 if the elements of an n-elem.docx
Write a program in C++ that will return 1 if the elements of an n-elem.docxWrite a program in C++ that will return 1 if the elements of an n-elem.docx
Write a program in C++ that will return 1 if the elements of an n-elem.docx
 
Write a java program that reads 10 integers from the keyboard and stor.docx
Write a java program that reads 10 integers from the keyboard and stor.docxWrite a java program that reads 10 integers from the keyboard and stor.docx
Write a java program that reads 10 integers from the keyboard and stor.docx
 
writing formulas for compounds chart Writing Formulas for Compounds Ch.docx
writing formulas for compounds chart Writing Formulas for Compounds Ch.docxwriting formulas for compounds chart Writing Formulas for Compounds Ch.docx
writing formulas for compounds chart Writing Formulas for Compounds Ch.docx
 
Write the expression as the logarithm of a single quantity- 1.docx
Write the expression as the logarithm of a single quantity-      1.docxWrite the expression as the logarithm of a single quantity-      1.docx
Write the expression as the logarithm of a single quantity- 1.docx
 
Write and implement a recursive version of the binary search algorithm.docx
Write and implement a recursive version of the binary search algorithm.docxWrite and implement a recursive version of the binary search algorithm.docx
Write and implement a recursive version of the binary search algorithm.docx
 
write a file declaration that holds text charaters and can be stored i.docx
write a file declaration that holds text charaters and can be stored i.docxwrite a file declaration that holds text charaters and can be stored i.docx
write a file declaration that holds text charaters and can be stored i.docx
 
Write the equation in the slope-intercept form- Solution.docx
Write the equation in the slope-intercept form-       Solution.docxWrite the equation in the slope-intercept form-       Solution.docx
Write the equation in the slope-intercept form- Solution.docx
 
Write the balanced neutralization reaction between H2S04 and KOH in aq.docx
Write the balanced neutralization reaction between H2S04 and KOH in aq.docxWrite the balanced neutralization reaction between H2S04 and KOH in aq.docx
Write the balanced neutralization reaction between H2S04 and KOH in aq.docx
 
Write an outline for the following research paper topic- Managerial Ac.docx
Write an outline for the following research paper topic- Managerial Ac.docxWrite an outline for the following research paper topic- Managerial Ac.docx
Write an outline for the following research paper topic- Managerial Ac.docx
 
write a vb program that uses a while loop that prompts a user to enter.docx
write a vb program that uses a while loop that prompts a user to enter.docxwrite a vb program that uses a while loop that prompts a user to enter.docx
write a vb program that uses a while loop that prompts a user to enter.docx
 
Write a temperature conversion program that converts from Fahrenheit t.docx
Write a temperature conversion program that converts from Fahrenheit t.docxWrite a temperature conversion program that converts from Fahrenheit t.docx
Write a temperature conversion program that converts from Fahrenheit t.docx
 
Write a function file in matlab that utilizes Eulers method to solve t.docx
Write a function file in matlab that utilizes Eulers method to solve t.docxWrite a function file in matlab that utilizes Eulers method to solve t.docx
Write a function file in matlab that utilizes Eulers method to solve t.docx
 

Recently uploaded

Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxOH TEIK BIN
 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting DataJhengPantaleon
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentInMediaRes1
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxRoyAbrique
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
Concept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfConcept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfUmakantAnnand
 
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991RKavithamani
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application ) Sakshi Ghasle
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 

Recently uploaded (20)

Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media Component
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Concept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfConcept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.Compdf
 
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application )
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 

Write a program that calculates the final value of a ten year- $10-000.docx

  • 1. Write a program that calculates the final value of a ten year, $10,000 investment whose annual return gradually declines from 2% to 1% over that term Solution /Header file section #include<iostream> using namespace std; //Program begins with a main function int main() { //Initialize variables double investment=10000, highIntrest=0.02,changeIntrest=0.01,years=10,result; //prompt output cout<<"Year "<<"Final_value "<<endl; //Calculate the final value of a ten year for(int i=1;i<=10;i++) { investment = (investment* highIntrest)+investment; highIntrest=changeIntrest; cout<<i<<"Â Â Â Â "<<investment<<endl; } cout<<"Final Value of a ten year="<<investment<<endl<<endl; //Pause the system for a while system("pause"); return 0; }