Computer Science, asked by babita589, 9 months ago

A certain amount of money is invested for 3 years at the rate of 6%, 8% and 10% per
annum compounded annually. Write a program to calculate:in java

(b) the amount after 3 years.
(it) the compound interest after 3 years.
Accept certain amount of money (Principal) as an input.
in java​

Answers

Answered by ramabisa
15

Answer:

Explanation:

import java.util.Scaner;

class interest

{

public static void main(String[]args)

{

double amt,CI;

Scanner in=new Scanner(System.in);

System.out.println("Enter the amount of money you would like to invest");

int sum = in.nextInt();

amt = sum * 106/100 * 108/100 * 110/100; // here we are taking the values to be 106/100, 108/100 and 110/100 rather than 1+6/100

System.out.println("The amount is: "+amt);

CI = amt - sum;

System.out.println(The compount interest is: "+CI);

}

}

Similar questions