Question: / / Put in a prologue #include #include #include #include using namespace std; const unsigned MAX _ MATRIX _ SIZE = 2 0 ; const
Put in a prologue
#include
#include
#include
#include
using namespace std;
const unsigned MAXMATRIXSIZE ;
const unsigned WIDTHDISPLAY ;
bool readMatrixFromFileintMAXMATRIXSIZE unsigned& unsigned& ifstream&;
void displayMatrixintMAXMATRIXSIZE unsigned, unsigned;
void displayCalcMatrixSumsintMAXMATRIXSIZE unsigned, unsigned, intMAXMATRIXSIZE;
void symmetryCheckMatrixint unsigned, unsigned;
void sortMatrixRowsintMAXMATRIXSIZE unsigned, unsigned;
int main
unsigned height,
width;
int matrixMAXMATRIXSIZEMAXMATRIXSIZE
colSumsMAXMATRIXSIZE;
string INPUTFILENAME "matrixes.txt;
ifstream inputFileStreamObjINPUTFILENAME;
if inputFileStreamObjfail
cout "File INPUTFILENAME "could not be opened endl;
cout endl "Press the enter key once or twice to leave..." endl; cin.ignore; cin.get;
exitEXITFAILURE;
do
if readMatrixFromFilematrix height, width, inputFileStreamObj
break;
cout "Input:" endl;
displayMatrixmatrix height, width;
displayCalcMatrixSumsmatrix height, width, colSums;
symmetryCheckMatrixcolSums width, height;
sortMatrixRowsmatrix width, height;
cout "Sorted:" endl;
displayMatrixmatrix height, width;
cout endl "Press the enter key once or twice to continue..." endl; cin.ignore; cin.get;
while true;
cout "Program Done" endl;
exitEXITSUCCESS;
bool readMatrixFromFileint matrixMAXMATRIXSIZE unsigned& height, unsigned& width, ifstream& inputFileStreamObj
returnfalse;
void displayMatrixint matrixMAXMATRIXSIZE unsigned height, unsigned width
void displayCalcMatrixSumsint matrixMAXMATRIXSIZE unsigned height, unsigned width, int colSumsMAXMATRIXSIZE
void symmetryCheckMatrixint colSums unsigned width, unsigned height
void sortMatrixRowsint matrixMAXMATRIXSIZE unsigned width, unsigned height
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
