Can somebody help me with the following question?
if we are given the following code:
char letter = ‘ ‘;
cout << “Enter a letter: “;
cin >> letter;
How can we rewrite the following if statement without using the toupper function:
if ( toupper(letter) = “X” )
cout << “The letter entered was either x or X” << endl;
Thank you in advance!
You need to check if the char entered == x or if the char entered == X