-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlabo_09_riesen_florian_gallay_david.cpp
55 lines (40 loc) · 1.23 KB
/
labo_09_riesen_florian_gallay_david.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
/*
-----------------------------------------------------------------------------------
Laboratoire : Labo_09
Fichier : labo_09_riesen_florian_gallay_david.cpp
Auteur(s) : Florian Riesen et David Gallay
Date : 17.12.2019
But : Analyse matrix by applying many algorithms on it
Remarque(s) :
There is the github repository:
https://github.com/dgheig/labo09
Compilateur : MinGW-g++ 6.3.0 and g++ 7.4.0
-----------------------------------------------------------------------------------*/
#include <iostream>
#include <cstdlib>
#include "src/matrice.h"
using namespace std;
#define WAIT_ENTER while(cin.get()!='\n')
int main() {
Matrix matrix = {
{13,14,15,16},
{1,2,3,4},
{8,5,6,7},
{1,2,3,5}
};
Matrix matrix2 = {
{1, 2, 3, 5, 6},
{4, 7, 9},
{4, 2, 9},
};
cout << matrix << endl;;
int sumRL = 0;
int sumLR = 0;
sumDiagRL(matrix, sumRL);
sumDiagLR(matrix, sumLR);
cout << "RL: " << sumRL << endl;
cout << "LR: " << sumLR << endl;
cout << "Maximum column size: " << maxCol(matrix2) << endl;
WAIT_ENTER;
return EXIT_SUCCESS;
}