经过很长时间试图让我的else语句工作,它只是没有。无论我输入什么,该程序都会返回第一个。请帮忙。我的其他如果语句使用字符串不工作
#include <iostream>
#include <string>
using namespace std;
string arehap;
int main()
{
cout << "Are you happy?" << endl;
cin >> arehap;
if (arehap == "Yes" || "Y")
{
cout << "Good." << endl;
}
else if (arehap == "No" || "N")
{
cout << "Bad." << endl;
}
return 0;
}