Input/Output for lines of text: Difference between revisions
Content added Content deleted
(Added FreeBASIC) |
|||
Line 104: | Line 104: | ||
doStuff(readln.idup); |
doStuff(readln.idup); |
||
}</lang> |
}</lang> |
||
=={{header|FreeBASIC}}== |
|||
<lang freebasic>' FB 1.05.0 Win64 |
|||
Sub printLines(lines() As String) |
|||
For i As Integer = LBound(lines) To UBound(lines) |
|||
Print lines(i) |
|||
Next |
|||
End Sub |
|||
Dim As UInteger n |
|||
Input "", n |
|||
Dim lines(1 To n) As String |
|||
For i As Integer = 1 To n |
|||
Line Input lines(i) |
|||
Next |
|||
Print |
|||
printLines lines() |
|||
Sleep</lang> |
|||
{{out}} |
|||
<pre> |
|||
3 |
|||
hello |
|||
hello world |
|||
Pack my Box with 5 dozen liquor jugs |
|||
hello |
|||
hello world |
|||
Pack my Box with 5 dozen liquor jugs |
|||
</pre> |
|||
=={{header|Go}}== |
=={{header|Go}}== |