Guest User

Untitled

a guest
Feb 16th, 2020
1,831
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2.  
  3. Skip to content
  4. Using Gmail with screen readers
  5. Enable desktop notifications for Gmail.
  6. OK No thanks
  7.  
  8. 1 of 221
  9. codes
  10. Inbox
  11. x
  12.  
  13. NightCore rem <markromelfeguro@gmail.com>
  14. Attachments
  15. 11:54 AM (0 minutes ago)
  16. to me
  17.  
  18.  
  19. Attachments area
  20.  
  21. /*
  22. * To change this license header, choose License Headers in Project Properties.
  23. * To change this template file, choose Tools | Templates
  24. * and open the template in the editor.
  25. */
  26. package houseloan;
  27.  
  28. import java.util.Scanner;
  29.  
  30. /**
  31. *
  32. * @author markromelfeguro
  33. */
  34. public class Houseloan {
  35.  
  36. /**
  37. * @param args the command line arguments
  38. */
  39. public static void main(String[] args) {
  40. String bname;
  41. int term_loan;
  42. Double amount_loan,rate,rates,interest,total_loan,annual_amort,month_amort;
  43.  
  44. Scanner inp = new Scanner(System.in);
  45.  
  46. System.out.println("Borrwers Name: ");
  47. bname = inp.nextLine();
  48.  
  49. System.out.println("Amount Of Loan: ");
  50. amount_loan = inp.nextDouble();
  51.  
  52. System.out.println("Term of Loan: ");
  53. term_loan = inp.nextInt();
  54.  
  55. if (term_loan >= 16) {
  56. rate = 15.0;
  57. } else if (term_loan >= 12) {
  58. rate = 14.0;
  59. } else if (term_loan >= 10) {
  60. rate = 13.0;
  61. } else if (term_loan >= 8) {
  62. rate = 12.0;
  63. } else if (term_loan >= 5) {
  64. rate = 11.0;
  65. } else if (term_loan >= 3) {
  66. rate = 10.0;
  67. } else if (term_loan >= 3) {
  68. rate = 9.0;
  69. } else {
  70. rate = 8.0;
  71. }
  72.  
  73. rates = rate / 100;
  74. interest = amount_loan * (rates * term_loan);
  75. total_loan = amount_loan + interest;
  76. annual_amort = total_loan / term_loan;
  77. month_amort = total_loan / (term_loan * 12);
  78.  
  79. System.out.println("Borrwers Name: " + bname);
  80. System.out.println("Term: " + term_loan);
  81. System.out.println("Interest: " + interest);
  82. System.out.println("Total Loan: " + total_loan);
  83. System.out.println("Annual Amortization: " + annual_amort);
  84. System.out.println("Monthly Amortization: " + month_amort);
  85. }
  86.  
  87. }
  88. SENDCODES.txt
  89. Displaying SENDCODES.txt.
RAW Paste Data