Kernighans large earthquake problem: Difference between revisions

no edit summary
(Kernighans large earthquake problem en BASIC256)
No edit summary
Line 1,336:
5/18/1980 MountStHelens 7.6
</pre>
 
=={{header|PureBasic}}==
<lang PureBasic>If OpenConsole() And ReadFile(0,"data.txt")
PrintN("Those earthquakes with a magnitude > 6.0 are:")
While Not Eof(0)
buf$=Trim(ReadString(0))
If ValF((StringField(buf$,CountString(buf$," ")+1," ")))>6.0
PrintN(buf$)
EndIf
Wend
CloseFile(0)
Input()
EndIf</lang>
{{out}}
<pre>Those earthquakes with a magnitude > 6.0 are:
8/27/1883 Krakatoa 8.8
5/18/1980 MountStHelens 7.6</pre>
 
=={{header|Python}}==
164

edits