Created
June 23, 2016 10:58
-
-
Save monkieboy/70713086b67d3fece44fa10d6b26cabb to your computer and use it in GitHub Desktop.
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
module ProgNet.Program | |
open System | |
open ProgNet.ClimbHill | |
[<EntryPoint>] | |
let main argv = | |
let printTitle title = | |
printfn "" | |
printfn "" | |
printfn "%s" title | |
printfn "%s" (String('=', title.Length)) | |
printfn "" | |
printTitle "Estimating Battery Life" | |
let bestLine = BatteryLife.findBestLine Fuel.Readings | |
let totalMinutes = bestLine.InitialFuel / (- bestLine.Slope) | |
let missionStart = DateTime(2016, 6, 1, 0, 0, 0) | |
let elapsedMinutes = DateTime.Now.Subtract(missionStart).TotalMinutes | |
let remainingMinutes = totalMinutes - elapsedMinutes | |
printfn "%s minutes remaining." (remainingMinutes.ToString("n1")) | |
Console.ReadKey() |> ignore | |
0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment