aboutsummaryrefslogtreecommitdiff
path: root/challenge-157/conor-hoekstra/apl/ch-1.apl
blob: 813c373bbe06ee041978f28bc44e35f240b4354b (plain)
1
2
3
4
5
6
7
8
9
10
11
AM  +/÷≢
GM  ×/
HM  ≢÷+/∘÷
means  AM,GM,HM

⎕PP2 ⍝ Set significant digits

⍝ Tests
means 1 3 5 6 9  ⍝ 4.8 3.8 2.8
means 2 4 6 8 10 ⍝ 6 5.2 4.4
means 1 2 3 4 5  ⍝ 3 2.6 2.2