Question: C++ assignment- Write a program that multiplies two INTEGER matrices given to you in two files whose names will be passed via command line arguments,
C++ assignment-
Write a program that multiplies two INTEGER matrices given to you in two files whose names will be passed via command line arguments, your program must print out the output matrix to STDOUT in the same format as the matrices in files:
matrix1.txt (here the given matrix is 2*3 )
1 2 1
2 1 2
matrx2.txt (here the given matrix is 3*2)
1 3
2 2
3 1
matrixproduct -m matrix1.txt -M matrix2.txt
8 8
10 10
Note any type of space can be used as separator. Must use streams for input output and as much use of C++ as possible,
warning by professor-
"Guys the problem statement clearly states that your program should take the input files from command line NOT THE INPUT. If your file is reading the input matrix from the stdin most likely the outograding script will give you zero. Also very important if you print anything other than the resulting matrix in a format of one row per line with numbers separated by space you will likely get zero grade. Please do follow the problem specs and do not deviate from it as due to the volume of the class we need automatic grading tools that will fail your problem if you deviate from what is expected."
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
