a) The first two numbers indicate the size of the matrix - rows, columns, the next numbers in the quantity being the product of the number of rows and columns are the elements of the matrix arranged in rows.
b) The next matrix is saved immediately after the previous one.
c) After each pair of matrices there is a text operator indicating what operation on
two preceding matrices should be made - valid values are +, -, *.
d) The input file can contain any number of operations on matrix pairs
by repeating blocks consisting of 2 matrices and an operator.
e) The program sequentially loads matrix pairs and performs the indicated operations by checking
at the same time whether they are possible. If the operation is impossible, it is printed
incorrect data message and the program continues working.
f) The program should be divided into functions, including the function (s) responsible for
performing calculations on matrices.
g) The result of subsequent operations is printed to the standard output in the same form
as used in the input file.
for example
23
123456
32
654321
*
but have no clue what to do with it :( . Could someone help me ?
the format of your examples is wrong.
23 (23 rows)
123456(123456 columns?)
and the 23*123456 data segment is missing. where are all the values? also, consider using a smaller example, that is a lot of numbers.
@OP You need to break this down into a number of tasks. Write code for one task, then test that it's working, then move on to the next. For example:
- Read from the file the size information for a matrix
- create a matrix with those dimensions
- Read from the file the values to be stored in the matrix
- Store those values in the matrix
- Read the operator from the file
- etc
I started to go there but that does not make sense, you wouldn't inject end of lines in there in that case, as that just makes it more annoying and no one would do that, so I reverted to makes no sense.