Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
15
Task/Currency/F-Sharp/currency.fs
Normal file
15
Task/Currency/F-Sharp/currency.fs
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
open System
|
||||
|
||||
let hamburgers = 4000000000000000M
|
||||
let hamburgerPrice = 5.50M
|
||||
let milkshakes = 2M
|
||||
let milkshakePrice = 2.86M
|
||||
let taxRate = 0.0765M
|
||||
|
||||
let total = hamburgers * hamburgerPrice + milkshakes * milkshakePrice
|
||||
let tax = total * taxRate
|
||||
let totalWithTax = total + tax
|
||||
|
||||
printfn "Total before tax:\t$%M" <| Math.Round (total, 2)
|
||||
printfn " Tax:\t$%M" <| Math.Round (tax, 2)
|
||||
printfn " Total:\t$%M" <| Math.Round (totalWithTax, 2)
|
||||
Loading…
Add table
Add a link
Reference in a new issue