I am going to answer this in C++ as it is more comfortable for me to do so, and so I do not make any syntax mistakes. The logic does not change.
Convert the user input to a char. Only accept uppercase alphabet characters by using the following snippet.
if( userInput < 'A' || userInput > 'Z' )
std::cout << "The starting lower is: " << YourLowerVariable<< std::endl;
if (YourLowerVariable + 32 == userInput)
{
std::cout << "You are correct!";
system("pause");
}
return 0;
There is a difference of 32 in the ASCII version of a to A, as well as b to B and so on.