Skip to content

Instantly share code, notes, and snippets.

@R3DHULK
Created April 11, 2023 17:26
Show Gist options
  • Save R3DHULK/d146c160b52fd2741c024f415ca721e4 to your computer and use it in GitHub Desktop.
Save R3DHULK/d146c160b52fd2741c024f415ca721e4 to your computer and use it in GitHub Desktop.
Matrix In Batch Programming
@echo off
color 0a
mode 100,50
title Matrix
:matrix_loop
cls
setlocal enabledelayedexpansion
set /a "count=0"
for /l %%a in (1,1,50) do (
set /a "num=!random!%%2"
if !num! equ 0 (
echo.
) else (
set /a "color=!random!%%8"
set /p "= " <nul
<nul set /p "."
set /a "count+=1"
)
)
echo.
echo.
echo %count% characters printed.
timeout /t 1 >nul
goto matrix_loop
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment