- Joined
- Jan 28, 2023
- Messages
- 5
- Reaction score
- 0
@echo off
setlocal enabledelayedexpansion
rem create list
set a[0]=michael
set a[1]=pique
set a[2]=elias
set a[3]=george
set a[4]=tobias
rem based on the table above and using (for) command to create the following content display:
for /L %%i in (0,1,4) do (
set /a j=4-%i%
echo !a[%%i]! !a[%%j]!)
if %i% LSS 4 (
set /a i+=1
)
pause
Can someone help? I want make it work and show me that
michael tobias
pique george
elias elias
george pique
tobias michael
setlocal enabledelayedexpansion
rem create list
set a[0]=michael
set a[1]=pique
set a[2]=elias
set a[3]=george
set a[4]=tobias
rem based on the table above and using (for) command to create the following content display:
for /L %%i in (0,1,4) do (
set /a j=4-%i%
echo !a[%%i]! !a[%%j]!)
if %i% LSS 4 (
set /a i+=1
)
pause
Can someone help? I want make it work and show me that
michael tobias
pique george
elias elias
george pique
tobias michael