leta=float3215fletb=float320fprintfn"———————————————————————————————————————————"printfn"Program to perform arithmetic operations"printfn"———————————————————————————————————————————"printfn"Value of a | %f "aprintfn"Value of b | %f "bprintfn"Value of a+b | %f "(a+b)printfn"Value of a-b | %f "(a-b)printfn"Value of a*b | %f "(a*b)printfn"Value of a/b | %f "(a/b)printfn"Value of a^b | %f "(a**b)printfn"———————————————————————————————————————————"
Output
kodingwindow@kw:~/fsharp$ dotnet run
———————————————————————————————————————————
Program to perform arithmetic operations
———————————————————————————————————————————
Value of a | 15.000000
Value of b | 0.000000
Value of a+b | 15.000000
Value of a-b | 15.000000
Value of a*b | 0.000000
Value of a/b | Infinity
Value of a^b | 1.000000
———————————————————————————————————————————
kodingwindow@kw:~$
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.