First Commit

This commit is contained in:
2022-03-30 17:31:43 +02:00
commit 27e959bc85
20 changed files with 228 additions and 0 deletions
+12
View File
@@ -0,0 +1,12 @@
{
"version": 1,
"isRoot": true,
"tools": {
"fsautocomplete": {
"version": "0.51.0",
"commands": [
"fsautocomplete"
]
}
}
}
Binary file not shown.
+14
View File
@@ -0,0 +1,14 @@
// Modules
open System
// Recursive definition of Fibonacci numbers
let rec fib n =
match n with
| 0 -> 0
| 1 -> 1
| _ -> fib (n-1) + fib (n-2)
// Read from stdin and print result
printfn "Inserisci l'indice del numero di fibonacci che vuoi calcolare:\n"
let i = Console.ReadLine() |> int
printfn "%A" (fib (i))
+12
View File
@@ -0,0 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<Compile Include="Program.fs" />
</ItemGroup>
</Project>