I have created the first version of the elisp code for problem3. There is a problem with the while loop, though.
I have fixed some of the bugs in the inner while loop of the project3.el file. It still needs a few tweaks, however.
The previous fix to the project3.el file created an infinite loop. This change removes the extra parentheses that caused the problem.
I stopped setting tempnum unecessarily in the else function of the nested if statement. Hopefully this will fix the elisp program.
I have created the c version of problem3. After many challenges and bugs, the code is now fully fuctional and doesn't take over 20min to complete.