devcpp is very suitable for algorithm questions. It is much smaller and can be used with the latest gcc version. I used to use it often. The vs2015 community is too big. It takes more than 20G to install the hard disk. Can you try printf("%c",a) first? It may be related to the code page set by your system. You right-click the title bar of the cmd window and go in to see what the system encoding is. Or open a command line window, type chcp and press Enter, and post the results
Your code is fine, just close another file. Also don’t use DEVCPP, change to VS or use Linux+GCC directly.
devcpp is very suitable for algorithm questions. It is much smaller and can be used with the latest gcc version. I used to use it often. The vs2015 community is too big. It takes more than 20G to install the hard disk.
Can you try printf("%c",a) first?
It may be related to the code page set by your system. You right-click the title bar of the cmd window and go in to see what the system encoding is. Or open a command line window, type chcp and press Enter, and post the results
If such an unscientific thing happens, post L1-011.cpp as well.