Write a C++ program to ask user to enter age and income.Check whether he\she is eligible to get loan

 

Write a C++ program to ask user to enter age and income.Check whether he\she is eligible to get loan

Write a C++ program to ask user to enter age and income.Check whether he\she is eligible to get loan

A bank gives loan in two situations

1. If customer’s age is more than 30 and salary is more than 30000

2. If customer’s age is less than or equal to 30 and income is more than or equal to 20000

Program:

Write a C++ program to ask user to enter age and income.Check whether he\she is eligible to get loan
Output:

output

Code:


#include<iostream>
using namespace std;
int main(){
    int age,income;
    cout<<"Please Enter your Age :";
    cin>>age;
    cout<<"\nPlease Enter your Income :";
    cin>>income;
    if(age>30 && income>30000)
    {
        cout<<"You can apply for Loan"; 
    }
    else if(age<=30 && income>=20000)
    {
        cout<<"You can apply for Loan";
    }
    else
    {
        cout<<"You are not eligible for loan! ";
    }
    return 0;
}


Post a Comment

0 Comments