Hello,
Im doing assignments where I need to multiply a set matrix with a vector.
Ive defined them below with a = matrix, v = vector
Everything works, but my question is more about formating now
I want it to also display the matrix and vectors and then show the end result. Preferably this would be displayed in a 4x4 matrix and the vector in a 1x4 column. If that makes sense.
Ive never been good at formatting so Im kind of struggling and have no idea where to begin, any pointers would be appreciated.
for all the rows
{
for all the columns in matrix
{
cout matrix column with formatting
}
cout vector column (1 entry) with format
cout answer column with format //if this were a matrix, you would do all the columns of result loop
cout endl;
}
if you wanted to get ultra fancy, extended ascii has box drawing tools you could write the standard
[] brackets around each matrix with those. That looks like the above with 'if first or last row then draw L bracket else draw | wall symbol repeated 6 times (start matrix, end matrix, start vector, end vector, start answer, end answer).