forked from exercism/futhark
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.fut
More file actions
44 lines (35 loc) · 719 Bytes
/
test.fut
File metadata and controls
44 lines (35 loc) · 719 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
import "space_age"
-- age on Earth
-- ==
-- input { "Earth" 1000000000i64 }
-- output { 31.69 }
-- age on Mercury
-- ==
-- input { "Mercury" 2134835688i64 }
-- output { 280.88 }
-- age on Venus
-- ==
-- input { "Venus" 189839836i64 }
-- output { 9.78 }
-- age on Mars
-- ==
-- input { "Mars" 2129871239i64 }
-- output { 35.88 }
-- age on Jupiter
-- ==
-- input { "Jupiter" 901876382i64 }
-- output { 2.41 }
-- age on Saturn
-- ==
-- input { "Saturn" 2000000000i64 }
-- output { 2.15 }
-- age on Uranus
-- ==
-- input { "Uranus" 1210123456i64 }
-- output { 0.46 }
-- age on Neptune
-- ==
-- input { "Neptune" 1821023456i64 }
-- output { 0.35 }
let main (planet: []u8) (seconds: i64): f64 =
age planet seconds