Advertisement
Guest User

Untitled

a guest
Feb 24th, 2020
146
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. import java.util.Scanner;
  2. class HomeApproval
  3. {
  4. public static void main (String[] args)
  5. {
  6. Scanner input = new Scanner(System.in);
  7. System.out.println("Please enter your first name:");
  8. String firstName = input.nextLine();
  9.  
  10. System.out.println(firstName + "Please enter the percentage of your down payment:");
  11. double downPaymentPercentage = input.nextDouble();
  12.  
  13.  
  14. if(downPaymentPercentage < 15.0)
  15. System.out.println("We're sorry" + firstName+ "your application has been rejected");
  16.  
  17. else
  18. {
  19. System.out.println(firstName + "Please enter your credit score:");
  20. int creditScore = input.nextInt();
  21. if(creditScore < 500)
  22. System.out.println("Congratulations!!" + firstName + "Your application has been approved!!");
  23. }
  24. }
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement