Question

14.Compound Interest hank account pays compound interest, it pays interest not only on the principal amount that was deposite
Meme Mid Term (Pat 0 The term opportunity cost is symonymous with the idea of MacBook A 3
1 0
Add a comment Improve this question Transcribed image text
Answer #1

CODE:

package packages_example;

import java.util.Scanner;

public class compoundInterest {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        // get input from user
        System.out.print("Enter the amount of principal : ");
        double principal = scan.nextDouble();
        System.out.print("Enter the annual interest rate : ");
        double rate = scan.nextDouble();
        System.out.print("Enter number of times per year interest in compounded : ");
        int num = scan.nextInt();
        System.out.print("Enter number of years : ");
        int years = scan.nextInt();
        // calculate interest
        double amount = principal * Math.pow((1+rate/num),num*years);
        // print result
        System.out.printf("Amount of money after %d years is %.2f",years,amount);
    }
}

OUTPUT:

C:\Program Files\Javaljdk-11.0.1\binljava.exe -javaagent:c Enter the amount of principal: the annual interest rate: Enter

Add a comment
Know the answer?
Add Answer to:
14.Compound Interest hank account pays compound interest, it pays interest not only on the principal amount...
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
  • The principal represents an amount of money deposited in a savings account subject to compound interest...

    The principal represents an amount of money deposited in a savings account subject to compound interest at the given rate. Find how much money will be in the account after the given number of years (Assume 360 days in a year.), and how much interest was earned. 5) 1.9tA= Pert Y= (1. :) - 1 Principal: $3500 Rate: 4.5% Compounded: monthly Time: 4 years amount in account: $4865.38; interest earned: $673.82 amount in account: $4188.85; interest earned: $688.85 amount in...

  • The principal represents an amount of money deposited in a savings account subject to compound interest...

    The principal represents an amount of money deposited in a savings account subject to compound interest at the given rate. Find how much money will be in the account after the given number of years (Assume 360 days in a year.), and how much interest was earned. Int A P A = Pert n nt 1 + 38) Principal: $10,000 Rate: 5% Compounded: semiannually Time: 5 years A) amount in account: $11,314.08; interest earned: $1314.08 B) amount in account: $12,762.82;...

  • 4 pts The principal represents an amount of money deposited in a savings account subject to...

    4 pts The principal represents an amount of money deposited in a savings account subject to compound Interest at the given rate. Find how much money will be in the account after the given number of years (Assume 360 days in a year.), and how much interest was earned. Au p(2.5) Principal: $3500 Rate: 4.5% Compounded: monthly Time: 4 years amount in account: $3552.2; interest earned: $52,80 amount in account: $4865.38; interest earned: 5673.82 amount in account: $3660.79; interest earned:...

  • What would a compound interest formula look like coded in PHP? The Compound Interest Formula is:...

    What would a compound interest formula look like coded in PHP? The Compound Interest Formula is: ? = ? (1 + ? ? ) ?? Where P = principal amount (the initial amount you borrow or deposit) r = annual rate of interest (as a decimal) t = number of years the amount is deposited or borrowed for. A = amount of money accumulated after n years, including interest. n = number of times the interest is compounded per year...

  • Question 18 3.33 pts The principal represents an amount of money deposited in a savings account...

    Question 18 3.33 pts The principal represents an amount of money deposited in a savings account subject to compound interest at the given rate. Find how much money will be in the account after the given number of years (Assume 360 days in a year.), and how much interest was earned. Tir Atte 2H A=P A. Pert Principal: $3500 Rate: 4.5% Compounded: monthly Time: 4 years amount in account: $3660.79. Interest earned: $160.79 amount in account: $4865.38; Interest earned: 5673.82...

  • Question 21 4 pts The principal represents an amount of money deposited in a savings account...

    Question 21 4 pts The principal represents an amount of money deposited in a savings account subject to compound Interest at the given rate. Find how much money will be in the account after the given number of years (Assume 360 days in a year.), and how much interest was earned. A - P(1.4) Principal: $10,000 Rate: 5% Compounded: semiannually Time: 5 years amount in account: $12.762.82: interest earned: $2762.82 amount in account: $11,314.08: interest earned: $1314.08 amount in account:...

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

  • 1. Calculate the compound amount when S1500 is deposited in an account earning an annual interest...

    1. Calculate the compound amount when S1500 is deposited in an account earning an annual interest rate of 5%, compounded monthly, for 18 months. 2, How much money should be invested in an account that earns 6% annual interest, com- pounded monthly, in order to have $15, 000 in 5 years? 3. How much interest is earned on a $2000 deposit for 2 years at a 0.12% monthly interest rate. compounded daily?

  • Suppose an initial principal P is deposited in an account that pays an annual rate of interest I ...

    Suppose an initial principal P is deposited in an account that pays an annual rate of interest I that is Uniform(0.03,0.05) and compounded m times per year. What is the PDF of A(t)? What is E[A(t)]? Suppose an initial principal P is deposited in an account that pays an annual rate of interest I that is Uniform(0.03,0.05) and compounded m times per year. What is the PDF of A(t)? What is E[A(t)]?

  • 1. Suppose an initial principal P is deposited in an account that pays an annual rate...

    1. Suppose an initial principal P is deposited in an account that pays an annual rate of interest i compounded m times per year. Show that the accumulated amount aftert years A(t) is given by

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