function result = shift5(message)
% decodes a message encoded with a Caesar shift
% cipher of 5. Assumes message is all upper
% case letters.

aVal = double('A');
adjustment = 26;
len = length(message);
result = zeros(1,len);
temp = ' ';

for ch = 1:len
    temp = message(ch) - 5;
    if (temp < aVal)
        temp = temp + adjustment;
    end
    result(ch) = temp;
end

result = char(result);
