I am not in C++, but the logic is coded wrongly.
Here if isEmployer is E then only it will check hasLocation, Then if HasLocation is L then only it will check HasSalary. Now if HasSalary is > 50000 you will get first string and else it will return second string. But for any thing other then E or L in first two condition it will not go in the third if only
It should have been
if (isEmployer == 'E')
{
if (hasLocation=='L')
if(hasSalary > 50000)
cout << "You Are Allowed To Get The Loan" << endl;
}
else
cout << "Not Allowed To Get The Loan" << endl;
Or You can put logical AND
if (((isEmployer == 'E') && (hasLocation=='L') && (hasSalary > 50000))
cout << "You Are Allowed To Get The Loan" << endl;
else
cout << "Not Allowed To Get The Loan" << endl;
PS: I am not sure about symbol for logical AND condition in C++
Thanks
Milind