I am working in C. I'm trying to copy values from one file to another new file minus the first line. Then I am setting the values in the new file to a matrix.
The first file contains:
Matrix1
2 3
1 6
2 4
3 5
I need to find some way to set the integers to int matrix1[4][2].
Is there a better way to do this? This is what I have so far:
Reading correct matrix using string comparison in C
We are writing a program that multiplies two matrices of size n x m and m x n together. The matrices are stored in a file. The user provides the filename in the command line prompt. The file is formatted like so:
/beginning/
matrix1
3 2
1 6
2 4
3 5
matrix2
2 3
2 8 9
8 2 1
/end/
matrix1 and matrix2 can be in any order. We are...
Leave a comment: