Jump to content

Input/Output for lines of text: Difference between revisions

m (→‎{{header|REXX}}: add Output sample)
Line 73:
}
</lang>
 
=={{header|Batch File}}==
<lang dos>
@echo off
setlocal enabledelayedexpansion
 
set /p lines=
 
for /l %%i in (1,1,%lines%) do set /p line%%i=
cls
for /l %%i in (1,1,%lines%) do echo !line%%i!
pause>nul
</lang>
{{in}}
<pre>
3
line 1
this is line 2
line 3 is the longest
</pre>
{{out}}
<pre>
line 1
this is line 2
line 3 is the longest
</pre>
 
=={{header|C}}==
Cookies help us deliver our services. By using our services, you agree to our use of cookies.