Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- while (monthlyPayment < lowPayment && !warning)
- {
- System.out.print("The monthly payment amount entered is possibly low, furthermore, this might cause a high amount of payments. "
- + "\nIs this fine? Y for Yes, N for No: ");
- userInput = keyboard.next();
- if (userInput.equalsIgnoreCase("Y"))
- {
- warning = true;
- }
- else
- {
- System.out.print("\nPlease enter monthly payment amount: ");
- monthlyPayment = keyboard.nextDouble();
- while (monthlyPayment < 0)
- {
- System.out.print("Invalid entry for monthly payment amount. Please enter monthly payment amount: ");
- monthlyPayment = keyboard.nextDouble();
- }
- }
- }
- return monthlyPayment;
Add Comment
Please, Sign In to add comment