Adding solution for problem 3 in lua.
Adding solution for problem 5 in lua.