Computer Science, asked by Abhisheksingh5722, 30 days ago

★Write a program that inputs principal amount, rate of interest and time and calculates compound interest.

.

[[ JAVA programming ]]
* Quality answer ​

Answers

Answered by abhi138573
1

Your answer :—

import java.util.Scanner;

class Question6 {

public static void main(String[] args) {

Scanner sc = new Scanner(System.in);

System.out.println("enter principal, rate of interest and time");

double principal = sc.nextDouble();

double interest = sc.nextDouble();

int years = sc.nextInt();

double amount = principal * Math.pow((1 + (interest/100.0)) , time)

double CI = amount - principal;

System.out.println("the compound interest is "+CI);

}

}

________________________________

Note :— Do this in any JAVA programming software !

Hope you understand :)

Similar questions