Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Skip to content
- Using Gmail with screen readers
- Enable desktop notifications for Gmail.
- OK No thanks
- 1 of 221
- codes
- Inbox
- x
- NightCore rem <markromelfeguro@gmail.com>
- Attachments
- 11:54 AM (0 minutes ago)
- to me
- Attachments area
- /*
- * To change this license header, choose License Headers in Project Properties.
- * To change this template file, choose Tools | Templates
- * and open the template in the editor.
- */
- package houseloan;
- import java.util.Scanner;
- /**
- *
- * @author markromelfeguro
- */
- public class Houseloan {
- /**
- * @param args the command line arguments
- */
- public static void main(String[] args) {
- String bname;
- int term_loan;
- Double amount_loan,rate,rates,interest,total_loan,annual_amort,month_amort;
- Scanner inp = new Scanner(System.in);
- System.out.println("Borrwers Name: ");
- bname = inp.nextLine();
- System.out.println("Amount Of Loan: ");
- amount_loan = inp.nextDouble();
- System.out.println("Term of Loan: ");
- term_loan = inp.nextInt();
- if (term_loan >= 16) {
- rate = 15.0;
- } else if (term_loan >= 12) {
- rate = 14.0;
- } else if (term_loan >= 10) {
- rate = 13.0;
- } else if (term_loan >= 8) {
- rate = 12.0;
- } else if (term_loan >= 5) {
- rate = 11.0;
- } else if (term_loan >= 3) {
- rate = 10.0;
- } else if (term_loan >= 3) {
- rate = 9.0;
- } else {
- rate = 8.0;
- }
- rates = rate / 100;
- interest = amount_loan * (rates * term_loan);
- total_loan = amount_loan + interest;
- annual_amort = total_loan / term_loan;
- month_amort = total_loan / (term_loan * 12);
- System.out.println("Borrwers Name: " + bname);
- System.out.println("Term: " + term_loan);
- System.out.println("Interest: " + interest);
- System.out.println("Total Loan: " + total_loan);
- System.out.println("Annual Amortization: " + annual_amort);
- System.out.println("Monthly Amortization: " + month_amort);
- }
- }
- SENDCODES.txt
- Displaying SENDCODES.txt.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement