I have the code but it prints the letters in uppercase but also prints some weird characters afterwards. I just wanted to know how to just get the letters.

the program executing picture.
[![enter image description here](https://i.stack.imgur.com/OI2vV.png)](https://i.stack.imgur.com/OI2vV.png)

using namespace std;

```
int main()
{

const int SIZE = 81;                                                       // Constant for size of an array
const int MIN_LOWERCASE = 97;                                              // Start of lowercase letters in ASCII
const int MAX_LOWERCASE = 122;                                             // End of lowercase letters in ASCII

char line[SIZE];                                                           // Initializing character line for input

cout << "Enter a string of 80 or fewer characters:\n";
cin.getline(line,SIZE);                                                    // Getting input from the user.

for (int count = 0; count < SIZE; count++)
{
    if (line[count] >= MIN_LOWERCASE && line[count] <= MAX_LOWERCASE)     // Checking whether the selected letter is in the reange of lowercase letters.
    {
         line[count] - 32;                                                
         cout << static_cast<char>(line[count] - 32);                     // converting and displaying lowercase letters to uppercase letters.

    }
    else
    {
        cout << static_cast<char>(line[count]);//Displaying the same character if it is in uppercase.                 

    }

}
cout << endl;

system("pause");
return 0;

}

```