18
This commit is contained in:
parent
03e7be38dd
commit
bb40f5bd19
2 changed files with 20 additions and 0 deletions
19
ulohyfs/src/u18.fs
Normal file
19
ulohyfs/src/u18.fs
Normal 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"
|
|
@ -11,6 +11,7 @@
|
||||||
<Compile Include="src\u16.fs" />
|
<Compile Include="src\u16.fs" />
|
||||||
<Compile Include="src\u15.fs" />
|
<Compile Include="src\u15.fs" />
|
||||||
<Compile Include="src\u17.fs" />
|
<Compile Include="src\u17.fs" />
|
||||||
|
<Compile Include="src\u18.fs" />
|
||||||
<Compile Include="src\Program.fs" />
|
<Compile Include="src\Program.fs" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue