vault backup: 2023-09-05 21:21:17

This commit is contained in:
2023-09-05 21:21:17 +02:00
parent 1421641bda
commit 7b0d47f12b
2 changed files with 18 additions and 1 deletions

View File

@ -146,7 +146,7 @@
"command-palette:Open command palette": false
}
},
"active": "13c9bfe482ec2d42",
"active": "c473a791e2b34194",
"lastOpenFiles": [
"Algo/Séminaire/Chapter 3 - Case analysis.md",
"Algo/Séminaire/Exercices sémaines.md",

View File

@ -61,3 +61,20 @@ let add_times h1 m1 s1 h2 m2 s2 =
let sec1 = sec_of_time h1 m1 s1 and sec2 = sec_of_time h2 m2 s2 in let resultsec = sec1 + sec2 in time_of_sec resultsec ;;
```
## Exercise 3.1
```Ocaml
let f a b c =
(if a > b && if b > c then
a + b else c + a
else if a > c then a + b else b + c)*
(if a > b && b > c then
a - b else a - c
else if a > c then a-b else b-c);;
```
### Exercise 3.2
```OCaml
if a && b then
true
else false