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

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%...
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...
2.20 Domain Lab 3.1 -- Velocity Calculator You may (or may not) need the following constants:...
2.20 Domain Lab 3.1 -- Velocity Calculator You may (or may not) need the following constants: Pi = 3.14 Speed of Light (c) = .307 parsecs/year Gravity (g) = 9.81 m/s squared Velocity Calculator Your program should ask the user (in this order) for: Initial Velocity Acceleration A Time Period Your program should then calculate and display the resulting final velocity based on the inputs provided.
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.
Write a program that acts as a basic calculator Assume the starting result is 0 Ask...
Write a program that acts as a basic calculator Assume the starting result is 0 Ask the user for the operation to be performed 0 – Exit 1 – Add 2 – Subtract 3 – Multiply 4 – Divide (Assume input will not be 0) Keep on performing the operation and showing the result until the user inputs the ‘0’ (exit) operation. You need to have everything written as functions E.g. - You should only have the options listed once...
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...
Write a Python program that computes the income tax for an individual. The program should ask...
Write a Python program that computes the income tax for an individual. The program should ask the user to enter the total taxable income for the year. The program then uses the tax bracket (as shown below) to calculate the tax amount. This is based on a progressive income tax system which is how income tax is calculated in the U.S. As a result, this for example means that only income above $500,001 is taxed at 37%. Income of lower...
Write a Python program that computes the income tax for an individual. The program should ask...
Write a Python program that computes the income tax for an individual. The program should ask the user to enter the total taxable income for the year. The program then uses the tax bracket (as shown below) to calculate the tax amount. This is based on a progressive income tax system which is how income tax is calculated in the U.S. As a result, this for example means that only income above $500,001 is taxed at 37%. Income of lower...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT