Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

use the visual C# to do it. should be 7 lines of the code to complete the questi

ID: 3711535 • Letter: U

Question

use the visual C# to do it. should be 7 lines of the code to complete the question. give me a form of the code and screenshot of the progarm runs. thank you.

7. Present Value Suppose you want to deposit a certain amount of money into a savings account and then leave it alone to draw interest for the next 10 years. At the end of 10 years you would like to have $10,000 in the account. How much do you need to deposit today to make that happen? You can use the following formula, which is known as the present-value formula, to find out The terms in the formula are as follows: P is the present value, or the amount that you need to deposit today. F is the future value that you want in the account. (In this case, Fis $10,000.) Programming Problems 3 .r is the annual interest rate n is the number of years that you plan to let the money sit in the account Write a method named PresentValue that performs this calculation. The methood should accept the future value,annual interest rate, and number of years as argu- ments. It should return the present value, which is the amount that you need to deposit today. Demonstrate the method in an application that lets the user experi- ment with different values for the formula's terms.

Explanation / Answer

#include<bits/stdc++.h>
using namespace std;
float presentvalue(float future,float interest_rate,int years);
int main()
{
float future;float interest_rate;int years;
cout << "Enter the values of future value, interest rate and number of years ";
cin >> future >> interest_rate >> years;
float ans=presentvalue(future,interest_rate,years);
cout << ans;
}

float presentvalue(float future,float interest_rate,int years)
{
   int temp=pow((1+interest_rate),years);
   float present=future/temp;
   return present;
}