Created
December 6, 2017 00:35
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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