Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local k = "9 6 27 25 15 21 27 18 5 1 4 27 20 8 9 19 27 25 15 21 27 1 18 5 27 7 1 25"
- local j = ""
- local alph = {"a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"," "}
- -- LOCAL K
- local tab = {}
- local savar = 0
- for i=1,#k do
- if string.sub(k,i,i) == " " and i == 1 then
- savar = i
- table.insert(tab,string.sub(k,1,i-1))
- elseif string.sub(k,i,i) == " " and i ~= 1 then
- table.insert(tab,string.sub(k,savar+1,i-1))
- savar = i
- elseif i == #k then
- table.insert(tab,string.sub(k,savar+1,i))
- end
- end
- local output = ""
- for i=1,#tab do
- local ll = tab[i]
- output = output..alph[tonumber(ll)]
- end
- print(output)
- --LOCAL J
- local output = ""
- for i=1,#j do
- local g = string.sub(j,i,i)
- for f=1,#alph do
- if alph[f] == g then
- output = output..f.." "
- break
- end
- end
- end
- print(output)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement