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.print("Enter your CIBIL score: ");
        int cibilScore = scanner.nextInt();

        System.out.print("Enter your age: ");
        int age = scanner.nextInt();

        System.out.print("Enter your monthly income: ");
        double monthlyIncome = scanner.nextDouble();

        if (cibilScore < 600 || age < 20 || age > 55 || monthlyIncome <= 50000) {
            System.out.println("Loan cannot be sanctioned based on the provided information.");
        } else {
            System.out.println("Congratulations! Your loan is sanctioned.");
        }

        scanner.close();
    }
}

Reactions

Post a Comment

0 Comments