Page MenuHomec4science

main.cpp
No OneTemporary

File Metadata

Created
Fri, Nov 1, 00:40

main.cpp

#include <iostream>
#include <cassert>
#include <cmath>
#include "Vector.hpp"
#include "Matrix.hpp"
int main(int argc, char *argv[]){
int size=3;
Vector b(size);
Vector c(size);
b[0]=0;b[1]=5;b[2]=10;
c[0]=10;c[1]=-9;c[2]=8;
TerminalPrint(b,"Vecteur b :");
TerminalPrint(c,"Vecteur c :");
TerminalPrint(b+c,"Vecteur b+c :");
Matrix A(size);
Matrix B(size);
A(1,1)=1;A(1,2)=1;A(1,3)=2;
A(2,1)=3;A(2,2)=4;A(2,3)=5;
A(3,1)=6;A(3,2)=7;A(3,3)=8;
B(1,1)=7;B(1,2)=-4;B(1,3)=3;
B(2,1)=11;B(2,2)=8;B(2,3)=-8;
B(3,1)=-6;B(3,2)=2;B(3,3)=13;
TerminalPrint(A,"Matrice A :");
TerminalPrint(B,"Matrice B :");
TerminalPrint(A*B,"Matrices A*B :");
return 0;
}

Event Timeline