This commit is contained in:
DavidOnTop 2025-01-15 09:10:30 +01:00
parent 03e7be38dd
commit bb40f5bd19
Signed by: DavidOnTop
GPG key ID: 8D3E9A75E3E13D89
2 changed files with 20 additions and 0 deletions

19
ulohyfs/src/u18.fs Normal file
View file

@ -0,0 +1,19 @@
module UlohyFs.u18
open System.IO
open UlohyFs.Attributes
open System
[<Uloha(18)>]
let uloha15() =
let mutable znamky = []
let mutable running = true
while running do
let znamka = Console.ReadLine() |> int
if znamka = 0 then
running <- false
else
znamky <- znamky @ [znamka]
znamky |> List.map float |> List.average |> printfn "Prumer: %f"
znamky |> List.min |> printfn "Minimum: %d"
znamky |> List.max |> printfn "Maximum: %d"

View file

@ -11,6 +11,7 @@
<Compile Include="src\u16.fs" />
<Compile Include="src\u15.fs" />
<Compile Include="src\u17.fs" />
<Compile Include="src\u18.fs" />
<Compile Include="src\Program.fs" />
</ItemGroup>