Advertisement
BobMe

I got bored again at school:2

Feb 19th, 2019
151
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. function stairword(strn)
  2. num = string.len(strn)
  3. for i=1,num do
  4. if string.sub(strn,i,i) ~= " " then
  5. print(string.sub(strn,1,i))
  6. end
  7. end
  8. for i=1,num-1 do
  9. if string.sub(strn,i,i) ~= " " then
  10. print(string.sub(strn,1,(num)-i))
  11. end
  12. end
  13. end
  14.  
  15. stairword("comments like these in youtube should be exiled")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement