Question

Suppose you want to deposit a certain amount of money into a savings account and then...

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

make that happen? You can use the following formula, which is known as the present

value formula, to find out:

                                   P = F / (1+ r)^n

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, F is $10,000.)
  • 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 program that has a function named presentValue that performs this calculation.

The function should accept the future value, annual interest rate, and number of

years as arguments. It should return the present value, which is the amount that you

need to deposit today. Demonstrate the function in a program that lets the user experiment

with different values for the formula’s terms.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

C PROGRAM (TRY TO TYPE A CODE SOME COMPILERS DOESN'T SUPPORTS COPY PASTE)

#include <stdio.h>
//function declaration
int presentValue(int,int,int);
//main function
int main()
{
//varaible declaration
int future=0,annual_intrest=0,number_of_years=0,present=0;
  
printf("Enter Future Value\n");
scanf("%d",&future);
printf("Enter annual_interest\n");
scanf("%d",&annual_intrest);
printf("Enter number of years\n");
scanf("%d",&number_of_years);
//calling a function presentValue and passing arguments and catch into a present varaible
present= presentValue(future,annual_intrest,number_of_years);
//printing present value
printf("present value = %d ",present);
return 0;
  
}

//function presentValue
int presentValue(int future,int annual_intrest,int number_of_years){
int temp=0;
//formula p=f/(1+r)^n;
temp=future/(1+annual_intrest)^number_of_years;
//function returs presentValue
return temp;
}

1 2 3 4 5 6- #include <stdio.h> //function declaration int presentValue(int,int, int); //main function int main() { //varaibl

Enter Future Value 10000 Enter annual_interest 20 Enter number of years 10 present value = 470 ...Program finished with exit

Enter Future Value 20000 Enter annual_interest Enter number of years 10 present value = 1808 ... Program finished with exit c

Add a comment
Know the answer?
Add Answer to:
Suppose you want to deposit a certain amount of money into a savings account and then...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • P5.3      Present Value. Suppose you want to deposit a certain amount of money into a savings...

    P5.3      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 tomake that happen? You can use the following formula, which is known as the present value formula, to find out: P = F/(1+r)^n The terms in the...

  • Visual C# Create Present Value application Application that lets you deposit a certain amount of money...

    Visual C# Create Present Value application Application that lets you 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 present-value formula, to find out. P =F/(1+r)^n P is the present value, or the amount...

  • Suppose you have a certain amount of money in a savings account that earns compound monthly...

    Suppose you have a certain amount of money in a savings account that earns compound monthly interest, and you want to calculate the amount that you will have after a specific number of months. The formula is as follows: f = p * (1 + i)^t • f is the future value of the account after the specified time period. • p is the present value of the account. • i is the monthly interest rate. • t is the...

  • Write a program that calculates the amount of money that you must invest In a savings...

    Write a program that calculates the amount of money that you must invest In a savings account at a given interest rate for a given number of years to have a certain dollar amount at me end of the period Y our program will ask the user for the amount the user wants to have at the end of the term (future value). the number of years the user plans to let the money stay in the account, and the...

  • LULUPULUS! WORK AREA Suppose you have a certain amount of money in a savings account that...

    LULUPULUS! WORK AREA Suppose you have a certain amount of money in a savings account that earns compound monthly interest, and you want to calculate the amount that you will have after a specific number of months. The formula is as follows: f=p* (1 + i)^t • fis the future value of the account after the specified time period. •p is the present value of the account. i is the monthly interest rate. .t is the number of months How...

  • The good news is that SAVING uses the same geometric series formula as BORROWING money! Assume you deposit $10 per month into a savings account with an annual interest rate of 30%, compounded monthly...

    The good news is that SAVING uses the same geometric series formula as BORROWING money! Assume you deposit $10 per month into a savings account with an annual interest rate of 30%, compounded monthly (a) Sketch the graph representing the amount that you've DEPOSITED into the account after r years. Hint: you can determine this formula and graph the function easily.) (b) In another color, copy your graph of f (r) from the previous slide. This is the total amount...

  • How much money should be deposited today in an account that earns 5% compounded semiannually so...

    How much money should be deposited today in an account that earns 5% compounded semiannually so that it will accumulate to $8000 in three years? The amount of money that should be deposited is $ (Round up to the nearest cent.) You deposit $14,000 in an account that pays 5% interest compounded quarterly A. Find the future value after one year B. Use the future value formula for simple interest to determine the effective annual yield. A. The future value...

  • Time Value of Money... More Practice 1. Calculate the amount that a person would have to...

    Time Value of Money... More Practice 1. Calculate the amount that a person would have to deposit today at 4% now. would have to deposit today at 4% interest to have $10,000 20 years from Is this a present value or future value problem? Is it an annuity or single amount 2. Calculate the amount that a person would have to deposit today at 10% interest in order to have $55,000 15 years from now. Is this a present value...

  • Your local bank is offering a new type of retirement savings account. An initial deposit is...

    Your local bank is offering a new type of retirement savings account. An initial deposit is made to the account when it is opened. This money and any accumulated interest must be left in the account for 29 years. No additional deposits can be made. On the day the account is opened and on each annual anniversary of the initial deposit, the account balance is reviewed and the following terms apply: 1. If the account balance is less than or...

  • 14.Compound Interest hank account pays compound interest, it pays interest not only on the principal amount...

    14.Compound Interest hank account pays compound interest, it pays interest not only on the principal amount that was deposited into the account, but also on the interest that has accumulated over time. Suppose you want to deposit some money into a savings account, and let the account earn compound interest for a certain number of years. The formula for calculating the balance of the account afer a specified namber of years is The terms in the formula are A is...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT