Donate. I desperately need donations to survive due to my health

Get paid by answering surveys Click here

Click here to donate

Remote/Work from Home jobs

Convert ASCII to Text Turing

So im trying to make an encrypt/decrypt program from text to ASCII and vice versa. The text to ASCII works fine but the ASCII to text wont work any ideas?

var phrase, choice, store : string
store := ""

put "Do you want to encrypt or decrypt [e/d] "..
get choice

if choice = "e" or choice = "E" then
    put "Enter a phrase: "..
    get phrase
    for i: 1.. length(phrase)
        store += chr(ord(phrase(i)) mod 26 + 97)
    end for
    put store


elsif choice = "d" or choice = "D" then
    put "Enter a phrase: "..
    get phrase
    for i: 1.. length(phrase)
        store += chr(ord(phrase(i)) )
    end for
    put store
end if

Comments