Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Testing {
- // private static char userInput;
- public static void main(String[] args) {
- // 2: Value to be used for Loan Amount (Principal)
- double P = 200000.00;
- // 4: Calculation for number of Months
- int yr3 = 30*12;
- int yr2 = 15*12;
- int yr1 = 7*12;
- int total;
- //array for years in months
- int yrs[] = {yr1,yr2,yr3};
- //array initialization to set up the print for years in months
- for (int i=0;i<yrs.length;i++)
- total = (total+yrs[i]);
- System.out.print(total);
- System.out.println();
- }
- }
Add Comment
Please, Sign In to add comment