Poroblem 4: add LONGT function, returns number of digits of an int.
Problem 4: slow but complete solution.