The program starts with a matrix with a maximum dimensions of 10 by 10. I have to ask the user to input the number of columns he would like the matrix to be. Once he enters that data he has to enter the values. For example he enters 2, therefore he has a maximum of 20 characters to enter. The problem is what if he enters only 13, or 14, or 6? How would I calculate the number of rows?
I'm planning on putting a break, for example I tell the user to enter 'x' to stop the input. How can I go ahead and do this?

Thanks in advance