F# program to check the given number is positive or negative
Program.fs
openSystemConsole.Write("Enter the number ")letn=int32(Console.ReadLine())ifn<0thenprintfn"%i is a negative number"nelifn>0thenprintfn"%i is a positive number"nelseprintfn"Given number is Zero"
Output
kodingwindow@kw:~/fsharp$ dotnet run
Enter the number -0
Given number is Zero
kodingwindow@kw:~/fsharp$ dotnet run
Enter the number -5
-5 is a negative number
kodingwindow@kw:~$
Advertisement
Thank You
Dear User, Thank you for visitng Kodingwindow. If you are interested in technical articles, latest technologies, and our journey further, please follow us on LinkedIn.
Dear User, We are grateful for your interest in the Kodingwindow Android app. We intend to soon make it available on the Google Play Store. Currently, Android versions 10 and up require manual apk installations. Would you like to get the app?