Guest User

Untitled

a guest
Jan 22nd, 2018
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. public class Testing {
  2. // private static char userInput;
  3.  
  4. public static void main(String[] args) {
  5. // 2: Value to be used for Loan Amount (Principal)
  6. double P = 200000.00;
  7. // 4: Calculation for number of Months
  8. int yr3 = 30*12;
  9. int yr2 = 15*12;
  10. int yr1 = 7*12;
  11. int total;
  12. //array for years in months
  13. int yrs[] = {yr1,yr2,yr3};
  14. //array initialization to set up the print for years in months
  15. for (int i=0;i<yrs.length;i++)
  16. total = (total+yrs[i]);
  17. System.out.print(total);
  18. System.out.println();
  19. }
  20. }
Add Comment
Please, Sign In to add comment