How to save solution in a loop?

Hello Robert,
Thank you very much! It works well! I am very grateful to see your answer!