update ocaml file

This commit is contained in:
2025-09-15 18:05:39 +02:00
parent 92632d3039
commit 1b9ae718f6
2 changed files with 43 additions and 1 deletions

View File

@@ -32,3 +32,26 @@ let max3 a b c = if a>b && a>c then a else if b>c then b else c;;
let min3 a b c = if a<b && a<c then a else if b<c then b else c;;
(*3.7*)
let s a = match a with
x when x <= 0 -> 0.
| x when x <= 500 -> 4.6
| x when x <= 1000 -> 5.9
| x when x <= 2000 -> 6.5
| x when x <= 3000 -> 7.2
| _ -> failwith "";;
let e a = match a with
x when x <= 0 -> 0.
| x when x <= 500 -> 3.4
| x when x <= 1000 -> 4.6
| x when x <= 2000 -> 5.1
| x when x <= 3000 -> 6.9
| _ -> failwith "";;
let ex a = match a with
x when x <= 0 -> 0.
| x when x <= 500 -> 9.1
| x when x <= 1000 -> 11.
| x when x <= 2000 -> 13.5
| x when x <= 3000 -> 14.2
| _ -> failwith "";;