Created
July 20, 2012 23:59
-
-
Save jl2/3153933 to your computer and use it in GitHub Desktop.
Calculate the approximate number of days till Arapahoe Basin opens
This file contains hidden or 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
-- Calculate the approximate number of days till Arapahoe Basin opens | |
with Ada.Text_Io; | |
use Ada.Text_Io; | |
with Ada.Calendar; | |
use Ada.Calendar; | |
procedure dts is | |
tod : Time := Clock; | |
OpeningDay : Time := Time_Of(Day=>25, | |
Month=>10, | |
Year=>Year(Tod)); | |
NumDays : Integer := Integer((Openingday - Tod) / Day_Duration'Last); | |
begin | |
Ada.Text_Io.Put_Line("There are" & Integer'Image(numdays) & " days till ski season."); | |
end dts; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment