Answer to Question #305158 in Java | JSP | JSF for rose

Question #305158

Make a Mortgage Calculator code


Make a Mortgage Calculator Test code


1
Expert's answer
2022-03-04T04:04:25-0500
import java.util.Scanner;
class App {
    public static void main(String[] args) {
       Scanner scan = new Scanner(System.in); 
      	System.out.print("Enter Principal Amount : ");
      	double principal = scan.nextDouble(); 
      	System.out.print("Enter Rate of Interest : ");
      	double rate = scan.nextDouble(); 
      	rate =( rate/100)/12; 
      	System.out.print("Enter Time period in years : ");
      	int time = scan.nextInt();
      	time = time * 12; 
      	double p= (principal * rate) / (1 - Math.pow(1 + rate, -time));
      	//
      	System.out.println("Payment: " + p);
    }
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS