Question
please follow the instruction ( very important )

1912275-dt content-rid 43901523 1/courses/CSct A31. (25 pts) You must use a tor loop in the following program Write, compile,
0 0
Add a comment Improve this question Transcribed image text
Answer #1

CODE :

#include<iostream>
#include<cmath>
using namespace std;
int main()
{
   int p,t;
   float r;
   cout<<"Enter number of years (t): ";
   cin>>t;
   cout<<"Enter principal amount (p): ";
   cin>>p;
   cout<<"Enter rate of interest (r): ";
   cin>>r;
   cout<<endl;
   for(int i=1;i<=t;i++)
   {
       float v = p * pow((1+((r/100)/12)), (12*i));
       cout<<"Year "<<i<<" Balance = "<<v<<endl;
   }
  
   return 0;
}

OUTPUT :

C:\UsersiREDEEMERNDesktop\Intrest.exe Enter number of years (t) 20 Enter principal amount (p) 1000 Enter rate of interest (r)

Add a comment
Know the answer?
Add Answer to:
please follow the instruction ( very important ) 1912275-dt content-rid 43901523 1/courses/CSct A31. (25 pts) You...
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
  • Write a program in Python that computes the interest accrued on an account. You can modify...

    Write a program in Python that computes the interest accrued on an account. You can modify the “futval.py” program given in Chapter 2 to accomplish it. Your program should use a counted loop rather than a formula. It should prompt the user to enter the principal amount, the yearly interest rate as a decimal number, the number of compounding periods in a year, and the duration. It should display the principal value at the end of the duration. To compute...

  • 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...

  • c++ and please add tables and everything and make sure program is complete. Write a menu...

    c++ and please add tables and everything and make sure program is complete. Write a menu driven program, which would compute compound interest and a monthly payment for a loan. The user will be given a choice to display the info on the screen or to a filo Menu will be the following Enter (1) to calculate your loan monthly payment Enter (2) to calculate your loan monthly payment & write to a file Tips: Compound Interest Formula A =...

  • Programming language: PYTHON Prompt: You will be creating a program to show final investment amounts from...

    Programming language: PYTHON Prompt: You will be creating a program to show final investment amounts from a principal using simple or compound interest. First, get a principal amount from the user. Next, ask the user if simple or compound interest should be used. If the user types in anything other than these options, ask again until a correct option is chosen. Ask the user to type in the interest rate as a percentage from 0 to 100%. Finally, ask the...

  • C++ Please Follow Instructions Write a program that displays an inches to centimeters conversion table. Your...

    C++ Please Follow Instructions Write a program that displays an inches to centimeters conversion table. Your input will be the smallest number of inches and the largest number of inches to be converted. The intervals will be in 6 inch increments. One inch is equivalent to 2.54 centimeters. Include the following in your program: 1. Include an initial algorithm that outlines your steps. 2. Include a refined algorithm that details how each step will be executed. 3. Prompt the User...

  • SOLVE USING C!!! Project objective: Conditional statements, loops, reading from file, user defined functions. **Submit source...

    SOLVE USING C!!! Project objective: Conditional statements, loops, reading from file, user defined functions. **Submit source code (LargeProg1.c) through Canvas One source code file(unformatted text) will be submitted Here is INCOMPLETE code to get started: LargeProg1.c The file name must match the assignment The code should be tested and run on a Microsoft compiler before it is uploaded onto Canvas The code must be submitted on time in order to receive credit (11:59PM on the due date) Late submissions will...

  • This C++ Program should be written in visual studio 2017 You are to write a program...

    This C++ Program should be written in visual studio 2017 You are to write a program that can do two things: it will help users see how long it will take to achieve a certain investment goal given an annual investment amount and an annual rate of return; also, it will help them see how long it will take to pay off a loan given a principal amount, an annual payment amount and an annual interest rate. When the user...

  • Number 16. Chapter 3 Problem Comes from "Starting out with >>> C++ From Control Structures through...

    Number 16. Chapter 3 Problem Comes from "Starting out with >>> C++ From Control Structures through Objects" Ninth Edition. Checking work Programming Challenges 147 16. Senior Citizen Property Tax Madison County provides a $5,000 homeowner exemption for its senior citizens. For example, if a senior's house is valued at $158,000, its assessed value would be $94,800, as explained above. However, he would only pay tax on $89,800. At last year's tax rate of $2.64 for cach $100 of assessed value,...

  • Write C++ program for a compound interest calculator. Ask the user for dep = initial deposit...

    Write C++ program for a compound interest calculator. Ask the user for dep = initial deposit r = interest rate expressed as a fraction (example: .06) t = years If we assume that the money is compounded on a monthly basis, the formula is: double final = dep * pow( 1 + r/12.0 , 12.0*t ); Then display the final amount. To earn full credit, comment your code well. Supposedly, with a deposit of 1000, and 5% interest (0.05), for...

  • (JAVA) Write a program that deals with inflation, which is essentially the rising cost of general goods over time.

    IN JAVAWrite a program that deals with inflation, which is essentially the rising cost of general goods over time. That is, the price of goods, such as a packet of peanuts, goes up as time goes by. So, you will write a program to gauge the expected cost of an item in a specified number of years. The program asks for the cost of the item, the number of years, and the rate of inflation. The output is the estimated...

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