Jump to content

Kernighans large earthquake problem: Difference between revisions

Added Arturo implementation
No edit summary
(Added Arturo implementation)
Line 468:
8/27/1883 Krakatoa 8.8
</pre>
 
=={{header|Arturo}}==
 
<lang rebol>data: {
3/13/2009 CostaRica 5.1
8/27/1883 Krakatoa 8.8
5/18/1980 MountStHelens 7.6
}
 
define :earthquake [date place magnitude][
init: -> this\magnitude: round.to:1 to :floating this\magnitude
]
 
print first sort.descending.by:'magnitude map split.lines data =>
[to :earthquake split.words &]</lang>
 
{{out}}
 
<pre>[date:8/27/1883 place:Krakatoa magnitude:8.8]</pre>
 
=={{header|AWK}}==
1,532

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.