Type Here to Get Search Results !

Online Financial interest and APR calculator tool 100% free

Financial Interest and APR Calculator

Financial Interest and APR Calculator

import java.util.Scanner; public class InterestCalculator { public static void



 main(String[] args) { Scanner scanner = new Scanner(System.in); System.out.print("Enter the principal amount: "); double principal = scanner.nextDouble(); System.out.print("Enter the interest rate: ");

 double rate = scanner.nextDouble(); System.out.print("Enter the time period (in years): "); double time = scanner.nextDouble(); double interest = calculateInterest(principal, rate, time);

 double apr = calculateAPR(principal, interest, time); System.out.println("Interest: " + interest); System.out.println("APR: " + apr + "%"); scanner.close(); } 

 public static double calculateInterest(double principal, double rate, double time) { double interest = principal * rate * time; return interest; } 

 public static double calculateAPR(double principal, double interest, double time) { double apr = (interest / (principal * time)) * 100; return apr; } }

Post a Comment

0 Comments
* Please Don't Spam Here. All the Comments are Reviewed by Admin.