Triple DES decryption

I'm creating the Triple DES decryption using the code below. but the code display symbol after 'z' character.

if (input[a]>='A' && input[a]<='Z')
{
input[a] = (input[a] - 'A' - key1 + key2 - key1) % 26 + 'A';
}
Topic archived. No new replies allowed.