Input/Output for lines of text: Difference between revisions
Content added Content deleted
(add →Free Pascal: implementation [allegedly inserting external links]) |
mNo edit summary |
||
Line 396: | Line 396: | ||
for i = 1, numLines do table.insert(lineTable, io.read()) end |
for i = 1, numLines do table.insert(lineTable, io.read()) end |
||
show(lineTable)</lang> |
show(lineTable)</lang> |
||
=={header|Nanoquery}}== |
|||
<lang Nanoquery>// get how many lines the user wants |
|||
amount = int(input()) |
|||
// loop through and get lines |
|||
lines = {} |
|||
for i in range(1, amount) |
|||
lines.append(input()) |
|||
end |
|||
// output the lines that the user entered |
|||
println |
|||
for line in lines |
|||
println line |
|||
end</lang> |
|||
{{out}} |
|||
<pre>3 |
|||
this is a test |
|||
the program will read three lines from the console |
|||
this is the third line |
|||
this is a test |
|||
the program will read three lines from the console |
|||
this is the third line</pre> |
|||
=={{header|Objeck}}== |
=={{header|Objeck}}== |