在此声明我不是在刻意标榜,而是以一个自豪的中国人身份写下了这段代码:
-----------------------------------
在此严重感谢zh159兄多次测试并指出bug。
-----------------------------------
于2008年4月18日再次更新,加入毫秒倒计时。
[ Last edited by zw19750516 on 2008-4-19 at 09:13 PM ]
-----------------------------------
在此严重感谢zh159兄多次测试并指出bug。
-----------------------------------
于2008年4月18日再次更新,加入毫秒倒计时。
@echo off&color ac&mode con cols=50 lines=10
title 奥运倒计时--made by zw19750516(cn-dos)
echo.&echo.&echo.
echo 我们每一个中国人都在期盼这一自豪时刻的到来!
echo.
for /l %%i in (1,1,100) do call,set cls=%%cls%%
goto one
:two
set n=2&set var=08-07&goto begin
ne
set n=1&set var=%date:~5,-4%
:begin
set month=%var:~1,1%&set number=29
set /a month-=1
for /l %%i in (1,1,%month%) do call :lp %%i
set /a number+=100%var:~3,2%%%100
set str=%str% %number%
if not %n% equ 2 goto two
for /f "tokens=1,2" %%i in ("%str%"
do set /a day=%%j-%%i
set /a hm=100-1000%time:~9,2%%%1000,m=60-100%time:~6,2%%%100,f=60-100%time:~3,2%%%100,s=43-%time:~,2%
if %hm% equ 100 set /a hm-=100,m+=1
if %m% equ 60 set /a m-=60,f+=1
if %f% equ 60 set /a f-=60,h+=1
if %s% geq 24 set /a s-=24,day+=1
set /p= 离北京奥运开幕还有%day%天%s%小时%f%分%m%秒%hm%毫秒<nul
set /p=%cls%<nul
set n=0&set number=0
goto begin
:lp
for %%i in (1,3,5,7,8,10) do if %%i equ %1 set /a number+=31
for %%i in (4,6,9,11) do if %%i equ %1 set /a number+=30[ Last edited by zw19750516 on 2008-4-19 at 09:13 PM ]
批处理之家新域名:www.bathome.net



