Hi mert144,
I'm sorry that I have to disappoint you. From my point of view your program behaves as expected. That what you call a problem / bug stems
from two false assumption that you have made:
1) It is not completely clear to you what the "%c" conversion for scanf() means. Therefore the basis for the unexpected behavior is already
founded on line 12.
2) You don't observe exactly how many and which keys you need to type to make your program respond with "E is a uppercase character" on a
new line.
To get a clear view about what really happens you should either debug your program by setting a breakpoint at line 13 and inspect the value of
"x" for each loop run or you may simply put a
printf("*-%02x-*\n", (unsigned char)x);
behind the scanf() call to see what happens.
I think then it should be clear why the program behaves as it does.
Cu,
pirx67