How to save every answers in matrix with 2 for loops.

Hi,I am a student,so I have a trouble to this problem.
I want to create a 8*2 matrix that save every loop answer.

right now I have

what should I do


Welcome to the RStudio community!

First of all, I'd like to inform you that if your questions are school or homework related, you should always clearly state so and read your guidelines on the topic:

Second, when asking a question here, it's best you create a reprex, where you generate the minimal code and data needed to recreate the issue you're having. You can find instructions how to build and share one here:

Kind regards,

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.