Update readme
This commit is contained in:
parent
425ec29b0a
commit
8e5231e74c
1 changed files with 49 additions and 11 deletions
60
README.md
60
README.md
|
@ -1,21 +1,23 @@
|
|||
<<<<<<< HEAD
|
||||
# mmathlib
|
||||
|
||||
**Compile and run**
|
||||
*get repo*
|
||||
```bash
|
||||
git clone https://code.smolnet.org/micke/mmathlib.git
|
||||
cd mmathlib
|
||||
```
|
||||
|
||||
*Compile and run*
|
||||
|
||||
**fractions**
|
||||
|
||||
```
|
||||
g++ -o fractions fractions.cpp
|
||||
|
||||
```
|
||||
***Output***
|
||||
|
||||
```
|
||||
./fractions
|
||||
g++ -o cnumber cnumber.cpp
|
||||
./cnumber
|
||||
g++ -o matrix matrix.cpp
|
||||
./matrix
|
||||
```
|
||||
|
||||
**Output**
|
||||
|
||||
```
|
||||
7/3=(7/3)
|
||||
7/3=2.333333333
|
||||
1/11=(1/11)
|
||||
|
@ -29,6 +31,16 @@ g++ -o matrix matrix.cpp
|
|||
(7/3)/(1/11)=(77/3)
|
||||
(7/3)/(1/11)=25.66666667
|
||||
0.75=(3/4)
|
||||
```
|
||||
|
||||
**Complex numbers**
|
||||
```
|
||||
g++ -o cnumber cnumber.cpp
|
||||
./cnumber
|
||||
```
|
||||
|
||||
***Output***
|
||||
```
|
||||
a = 3+2i
|
||||
a* = 3-2i
|
||||
a*a* = 13
|
||||
|
@ -43,6 +55,32 @@ a * b = 18-i
|
|||
(a * b)* = 18+i
|
||||
a / b = (6/25)+(17/25)i
|
||||
(a / b)* = (6/25)-(17/25)i
|
||||
```
|
||||
**vectors**
|
||||
```
|
||||
g++ -o vector vector.cpp
|
||||
./vector
|
||||
```
|
||||
***output***
|
||||
```
|
||||
v:
|
||||
| 1 |
|
||||
| 2 |
|
||||
| i |
|
||||
w:
|
||||
| 3 |
|
||||
| 4 |
|
||||
| 5 |
|
||||
v * w:
|
||||
11+5i
|
||||
```
|
||||
**matrices**
|
||||
```
|
||||
g++ -o matrix matrix.cpp
|
||||
./matrix
|
||||
```
|
||||
***output***
|
||||
```
|
||||
The matrix m:
|
||||
| 7 | 5 | i |
|
||||
| 0 | 2 | 0 |
|
||||
|
|
Loading…
Add table
Reference in a new issue