Program that converts a number to a letter of the alphabet #include &lt;iostream&gt;

int main() {
    int letter = 0;
    std::cout &lt;&lt; "Please type in a number: ";

    while (1) {
        std::cin &gt;&gt; letter;
        //less than 1 or greater than 26
        if (!(letter &lt; 1 || 26 &lt; letter)) {
            std::cout &lt;&lt; "The letter that corosponds to that value is '" 
                      &lt;&lt; char(64+letter) &lt;&lt; "'\n";
            return 0;
        }
        std::cout &lt;&lt;"The English Alphabet only has 26 letters. Try again\n";
    }
}


Gets a integer and prints it as a character. I had thought about using stdio instead of stream but I didn't want it to look scary to a beginner.
C++ does not mandate a particular character coding, so while your code is functionally correct on ASCII and ISO-8859 systems, it won't work in EBCDIC environments, for example.  Even with the obvious fix to add 'A'-1 in place of the magic constant 64, the program assumes that English letters have consecutive values, which just isn't the case in BCD encodings.

The portable approach is to index a string literal:

    static const std::string_view alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";

    if (letter &gt; 0 &amp;&amp; letter &lt;= alphabet.size()) {
        std::cout &lt;&lt; "Letter " &lt;&lt; letter &lt;&lt; " is '"
                  &lt;&lt; alphabet[letter-1]
                  &lt;&lt; "'\n";
    }




Other issues:


Don't use letter before checking whether std::cin &gt;&gt; letter succeeded.
Instead of an infinite loop, prefer a finite loop for reading inputs.
Consider accepting input as command-line argument(s) as a more convenient alternative to using standard input.
Spelling: "corresponds".