Ad Code

A person want to buy a New Car on loan .The bank has following requirement to sanction loan . a. CIBIL !<600 b. Age between 20 and 55 c. Monthly Income > 50,000 by considering all parameters design a loan prediction program using java.

import java.util.Scanner;
public class LoanPredictionProgram {
public static void main(String[] args) {
 Scanner scanner = new Scanner(System.in);
System.out.println("Enter CIBIL Score (should be less than 600): ");
 int cibilScore = scanner.nextInt();
 System.out.println("Enter Age (between 20 and 55): ");
 int age = scanner.nextInt();
 System.out.println("Enter Monthly Income (should be greater than 50,000): ");
 double monthlyIncome = scanner.nextDouble();
 if (cibilScore < 600 && age >= 20 && age <= 55 && monthlyIncome > 50000) {
 System.out.println("Loan Approved.");
 } else {
 System.out.println("Sorry, the loan cannot be approved.");
 }
 }
}
Reactions

Post a Comment

0 Comments