Skip to content

Instantly share code, notes, and snippets.

@kiramishima
Created December 6, 2017 00:35
Show Gist options
  • Save kiramishima/d4ad5950a9ed835e606be16004669f2d to your computer and use it in GitHub Desktop.
Save kiramishima/d4ad5950a9ed835e606be16004669f2d to your computer and use it in GitHub Desktop.
F# => Function to receive to two integers number from the user and then print the bigger
open System
let whatisbigger (x:int) (y:int): string =
if x = y then "x is equal to y"
else if x > y then "x isNull bigger than y"
else if x < y then "y is bigger than x"
else "it no supported"
[<EntryPoint>]
let main argv =
printfn "x refer to first number"
printfn "y refer to second number"
printfn "Enter two integer num"
let xstring = Console.ReadLine()
let x = int(xstring)
let ystring = Console.ReadLine()
let y = int(ystring)
let res = whatisbigger x y
printfn "%s" res
0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment