When I key in N or n, it will state as "Congratulations! You are qualified to apply", when it should actually be "Sorry, you are not qualified to apply because you failed your English".
#include <iostream>
usingnamespace std;
int main()
{
int Age = 0;
char passEnglish;
cout << "Enter your age: ";
cin >> Age;
if (Age >= 18)
{
cout << "Did you passed your GCE 'O' Level English \n(Please enter Y for Yes and N for No): ";
cin >> passEnglish;
if (passEnglish == 'Y' || 'y')
cout << "\nCongratulations! You are qualified to apply";
elseif (passEnglish == 'N' || 'n')
cout << "\nSorry, you are not qualified to apply because you failed your English";
}
else
cout << "\nSorry, you are not qualified to apply because you are below 18";
cin.ignore();
cin.ignore();
return 0;
}