Start by feeding it "known" text: assume a shift of one and the text "HELLO"
Create a text file using NotePad that contains just "IFMMP" and save it.
Put a breakpoint on the line:
char character = decr[i];
And run your app, feeding it the text file you just created.
Then step through your program one line at a time, and look at exactly what is going on.
The first line should fetch the encrypted character, the next should decrypt it - so you shown be able to see the decrypted character in the debugger.
It should be immediately obvious what the problem is! :laugh:
Hint: you won't need to go far to spot the problem...