Writing a program that when you type in a letter it would return the corresponding number on a phone. Every letter, number, anything returns the number 2. Any help would be appreciated. Code is as follows:
Basically C++ treats anything that is not-zero as "True". You aren't evaluating letter == a || letter == b.... You are basically saying if (TRUE || TRUE || TRUE....)