Question

In: Computer Science

2.29 Domain Lab 4.1 -- Compound Interest Calculator Compound Interest Calculator Your program should ask the...

2.29 Domain Lab 4.1 -- Compound Interest Calculator Compound Interest Calculator Your program should ask the user (in this order) for: Principal … In this equation, it is expressed as PV Annual Interest Rate Time Period (years) … Note that there are 12 compounding periods per year. So your n value in the equation is years multiplied by 12 Your program should then calculate and display: Total Interest Generated Total Future Value SPECIAL NOTE Make sure to round output to 2 decimal places!

Solutions

Expert Solution

//in C language

//importing header files
#include <stdio.h>
#include <math.h>
//main function
int main()
{
float PV, Interest_rate, year, CompInterest;

//tacking imput principle from user
printf("Enter principle : ");
scanf("%f", &PV);
//tacking imput time in years from user
printf("Enter time in years: ");
scanf("%f", &year);
//tacking imput rateinterest from user
printf("Enter rate: ");
scanf("%f", &Interest_rate);
  
// equation for calculating compound interest
CompInterest = PV* (pow ((1 + (Interest_rate / (12.0*100.0))), year*12));

// displaying the result
printf("Result Compound Interest = %.2f", CompInterest);
return 0;
}

------------------------------------------------------------------------------------------------------------------

#in python language

principle_Amount=float(input("Enter amount:"))
time=int(input("Enter time:"))
rate=float(input("Enter Rate:"))
CI=principle_Amount*pow((1+(rate/(12*100))),time*12)
print(CI)


Related Solutions

Using the Queue ADT: Create a program that uses a Queue. Your program should ask the...
Using the Queue ADT: Create a program that uses a Queue. Your program should ask the user to input a few lines of text and then outputs strings in same order of entry. (use of the library ArrayDeque) In Java please.
Using the Stack ADT: Create a program that uses a stack. Your program should ask the...
Using the Stack ADT: Create a program that uses a stack. Your program should ask the user to input a few lines of text and then outputs strings in reverse order of entry. (Optional) Create a similar program that uses a stack. Your new program should ask the user to input a line of text and then it should print out the line of text in reverse. To do this your application should use a stack of Character. In Java...
COMPOUND INTEREST/YIELD CALCULATIONS For this question, use the compound interest calculator found at investor.gov Assume you...
COMPOUND INTEREST/YIELD CALCULATIONS For this question, use the compound interest calculator found at investor.gov Assume you saved $10,000 and hope to invest it in a manner which would allow you to afford the down payment on a home that cost $250,000. On top of the $10,000 initial investment from your savings, you will invest $250 each month from your salary. You hope to purchase the home in ten years and plan to invest in a “safe” investment yielding between 3-7%...
2. Using the Stack ADT: Create a program that uses a stack. Your program should ask...
2. Using the Stack ADT: Create a program that uses a stack. Your program should ask the user to input a few lines of text and then outputs strings in reverse order of entry. In Java please.
1. Calculate the compound amount. Use the compound amount formula and a calculator. (Round your answer...
1. Calculate the compound amount. Use the compound amount formula and a calculator. (Round your answer to two decimal places.) P = $1700, r = 5% compounded semiannually, t = 12 years 2. Calculate the future value. (Round your answer to two decimal places.) P = $8000, r = 5.5% compounded quarterly, t = 3 years 3.Calculate the future value. (Round your answer to two decimal places.) P = $29,000, r = 8% compounded monthly, t = 5 years
Write a program that displays a weekly payroll report. A loop in the program should ask...
Write a program that displays a weekly payroll report. A loop in the program should ask the user for the employee number, gross pay, state tax, federal tax, and FICA withholdings. The loop will terminate when 0 is entered for the employee number. After the data is entered, the program should display totals for gross pay, state tax, federal tax, FICA withholdings, and net pay. Input Validation: Do not accept negative numbers for any of the items entered. Do not...
Business Applications. Find the present value (principal) or the compound interest, as indicated. Use a calculator...
Business Applications. Find the present value (principal) or the compound interest, as indicated. Use a calculator or Table 16-1 or Table 16-2 to find FVF or PVF. Round answers to the nearest cent. show entire solution please. 16. Bill Starnes needs to buy another used logging truck. His mother will loan him part of the money at 3% compounded quarterly. If Bill estimates that he will be able to repay his mother a total of $30,000 in 2 1/2 years,...
Need a program in java that creates a random addition math quiz The program should ask...
Need a program in java that creates a random addition math quiz The program should ask the user to enter the following The smallest and largest positive numbers to be used when generating the questions - The total number of questions to be generated per quiz - The total number of the quiz's to create from then the program should generate a random math (Just addition) quiz from what the user entered
what should this program do? Write a program (Lab8.cpp) that will ask the user for two...
what should this program do? Write a program (Lab8.cpp) that will ask the user for two file names. You will read the characters from each file and put them in separate queues. Then, you will read each character from each queue and compare it. If every character from both queues is the same, you will print “The files are identical.” Otherwise, you will print “The files are not identical.” Step-by-Step Instructions Create a character queue (named queue1) using the Standard...
Please use C language and use link list to do this program. This program should ask...
Please use C language and use link list to do this program. This program should ask user to enter two fraction polynomials. Then user chocie if he want add it or multiple it. I need you please to test it to see if it work with these two fraction polynomials 1-  Left Poly Pointer: 1/1x2 + 3/4x + 5/12 2-Right Poly Pointer: 1/1x4 – 3/7x2 + 4/9x + 2/11 AND AFTER ADDING 3- Resulting Poly Pointer: 1/1x4 + 4/7x2 + 43/36x...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT