@echo off
title Timer
color 0a
mode con cols=40 lines=8
setlocal enabledelayedexpansion
:starttime
set /p starttime="Nhap thoi gian bang phut: "
if %starttime% leq 0 (
echo Invalid input.
goto starttime
)
if %starttime% gtr 60 (
echo Nhap khong hop le.
echo ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ
goto starttime
)
:main
set mintime=%starttime%
set sectime=0
:mainloop
cls
call :display
timeout /t 1 >nul
if %sectime% geq 0 (
set /a sectime=%sectime%-1
)
if %sectime% lss 0 (
if %mintime% leq 0 (
goto endtime
) else (
set /a mintime=%mintime%-1
set sectime=59
)
)
goto mainloop
:endtime
cls
echo HET THOI GIAN!
echo Nhan phim bat ki de tiep tuc
echo ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ
pause >nul
goto starttime
:display
set n1l1= ÛÛ&set n2l1= ÛÛÛÛÛ &set n3l1=ÛÛÛÛÛÛÛÛ&set n4l1= ÛÛ ÛÛ &set n5l1=ÛÛÛÛÛÛÛÛ&set n6l1= ÛÛÛÛÛÛ &set n7l1=ÛÛÛÛÛÛÛÛ&set n8l1= ÛÛÛÛÛÛ &set n9l1= ÛÛÛÛÛÛ &set n0l1= ÛÛÛÛÛÛ &set nxl1=
set n1l2= ÛÛÛ&set n2l2=ÛÛ ÛÛ&set n3l2= ÛÛ &set n4l2= ÛÛ ÛÛ &set n5l2=ÛÛ &set n6l2=ÛÛ ÛÛ&set n7l2= ÛÛ&set n8l2=ÛÛ ÛÛ&set n9l2=ÛÛ ÛÛ&set n0l2=ÛÛÛ ÛÛÛ&set nxl2=ÛÛÛ
set n1l3= ÛÛÛÛ&set n2l3= ÛÛ &set n3l3= ÛÛ &set n4l3=ÛÛ ÛÛ &set n5l3=ÛÛ &set n6l3=ÛÛ &set n7l3= ÛÛ &set n8l3=ÛÛ ÛÛ&set n9l3=ÛÛ ÛÛ&set n0l3=ÛÛ ÛÛ&set nxl3=ÛÛÛ
set n1l4= ÛÛ&set n2l4= ÛÛ &set n3l4=ÛÛÛÛÛÛÛ &set n4l4=ÛÛÛÛÛÛÛÛ&set n5l4=ÛÛÛÛÛÛÛ &set n6l4=ÛÛÛÛÛÛÛ &set n7l4= ÛÛ &set n8l4= ÛÛÛÛÛÛ &set n9l4= ÛÛÛÛÛÛÛ&set n0l4=ÛÛ ÛÛ&set nxl4=
set n1l5= ÛÛ&set n2l5= ÛÛ &set n3l5= ÛÛ&set n4l5= ÛÛ &set n5l5= ÛÛ&set n6l5=ÛÛ ÛÛ&set n7l5= ÛÛ &set n8l5=ÛÛ ÛÛ&set n9l5= ÛÛ&set n0l5=ÛÛ ÛÛ&set nxl5=ÛÛÛ
set n1l6= ÛÛ&set n2l6= ÛÛ &set n3l6= ÛÛ &set n4l6= ÛÛ &set n5l6=ÛÛ ÛÛ&set n6l6=ÛÛ ÛÛ&set n7l6= ÛÛ &set n8l6=ÛÛ ÛÛ&set n9l6=ÛÛ ÛÛ&set n0l6=ÛÛÛ ÛÛÛ&set nxl6=ÛÛÛ
set n1l7= ÛÛ&set n2l7=ÛÛÛÛÛÛÛ&set n3l7=ÛÛÛÛÛÛ &set n4l7= ÛÛ &set n5l7= ÛÛÛÛÛÛ &set n6l7= ÛÛÛÛÛÛ &set n7l7= ÛÛ &set n8l7= ÛÛÛÛÛÛ &set n9l7= ÛÛÛÛÛÛ &set n0l7= ÛÛÛÛÛÛ &set nxl7=
if %mintime% geq 10 (
set min1=%mintime:~0,1%
) else (
set min1=0
)
set min2=%mintime:~-1,1%
if %sectime% lss 10 (
set sec1=0
) else (
set sec1=%sectime:~0,1%
)
set sec2=%sectime:~-1,1%
for /l %%a in (1,1,7) do (
call echo %%n!min1!l%%a%% %%n!min2!l%%a%% %%nxl%%a%% %%n!sec1!l%%a%% %%n!sec2!l%%a%%
)
goto :eof