This commit is contained in:
DavidOnTop 2025-01-15 09:18:45 +01:00
parent bb40f5bd19
commit 52677dbb23
Signed by: DavidOnTop
GPG key ID: 8D3E9A75E3E13D89
2 changed files with 23 additions and 0 deletions

22
ulohyfs/src/u19.fs Normal file
View file

@ -0,0 +1,22 @@
module UlohyFs.u19
open System.IO
open UlohyFs.Attributes
open System
let startsWithConsonant (s: string) =
let consonants = "bcdfghjklmnpqrstvwxz"
s.ToLower().[0] |> consonants.Contains
let startsWithVowel (s: string) =
let vowels = "aeiouy"
s.ToLower().[0] |> vowels.Contains
[<Uloha(19)>]
let uloha15() =
printfn "zadaj slovo"
let input = Console.ReadLine()
if startsWithConsonant input then
printfn "%s%cay" (input.Substring(1)) input.[0]
elif startsWithVowel input then
printfn "%sway" input

View file

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