- Code: Select all
#include <iostream>
#include <string>
#include <cmath>
using namespace std;
char x;
int main()
{
cout << "Is Family Guy funny?" << endl;
cin >> x;
if (x == 'Yes' || x == 'yes' )
cout << "Correct!" << endl;
else
cout << "WRONG" << endl;
system("Pause");
return 0;
}
I need help with this code, im just experimenting.
The issue is that when i run the code and type yes or Yes it still returns "WRONG" instead of "Correct!", can anyone help?



