Giving 5 inputs, program will check which entered character is the greater (assume characters are alphabets here only). 

This is the code I've written (All variables are of char data type).

Problem is, it's **printing the last entered character every time** which makes it obvious the logic is faulty.. 

Here's the code I've written:

```
cout << "Enter a character ";
cin >> chr;
for (int i = 0; i < 4; i++)
{
    cout << "Enter a character ";
    cin >> chr2;
    if (chr > chr2)
    {
        store = chr;
    }    
    else
    {
        store = chr2;
    }
    chr = chr2;
}

cout << "Greater character is "<< store << endl;

```