This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <iostream> | |
| #include <ctime> | |
| #include <time.h> | |
| #define INTEGER | |
| //#define DECIMAL //you'll have to change the type of an array from int to float | |
| using namespace std; | |
| #ifdef INTEGER | |
| void FillMatrix(int **matrix, const int size){ | |
| for (int i=0; i<size; i++){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <iostream> | |
| using namespace std; | |
| void FillMatrix(double **matrix, const int size){ | |
| for (int i=0; i<size; i++){ | |
| for (int j=0; j<size; j++){ | |
| matrix[i][j] = rand()%30; | |
| } | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <iostream> | |
| #include <cmath> | |
| using namespace std; | |
| void FillMatrix(double **matrix, const int size){ | |
| for (int i=0; i<size; i++){ | |
| for (int j=0; j<size; j++){ | |
| cout << "a[" << i+1 << "][" << j+1 << "] = "; | |
| cin >> matrix[i][j]; | |
| } |
NewerOlder