1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
:: pyramid.bat
@echo off
  setlocal enabledelayedexpansion
    for /l %%i in (1,1,%1) do (
      set t=!t!*
      echo !t!
    )
    for /l %%i in (%1,-1,2) do (
      set t=!t:~1,%%i!
      echo !t!
    )
  endlocal
goto :EOF