Does anybody know how to save the intermediate results inside a while function in a table? Here is my code. I would like to save the x,y,counter values in a table in every step that while takes. Thank you!
counter = 0;
While[counter < 5,
counter = counter + 1;
sol = NSolve[{2 x + y - counter == 0,
3 y + 5 x - 2 counter == 0}, {x, y}];
]