给个我以前写的,楼主借鉴下了:- @echo off&color ac&mode con cols=50 lines=10&setlocal enabledelayedexpansion
- title 这是我们每一个中国人的心声!!!
- echo.&echo.&echo.
- echo 打倒一切阻扰奥运的反动势力,全力支持北京奥运!
- echo.
- set "allday=31 29 31 30 31 30 31"
- for /l %%i in (1,1,50) do call,set cls=%%cls%%
- :begin
- set /a month=%date:~6,1%,day=100%date:~8,2%%%100
- for %%i in (%allday%) do (
- set /a n+=1
- if !n! geq %month% set /a days+=%%i
- )
- set /a days=days+8-day
- set /a hm=100-1000%time:~9,2%%%1000,m=60-100%time:~6,2%%%100,f=60-100%time:~3,2%%%100,s=20-%time:~,2%
- if %hm% lss 10 set hm=0%hm%
- 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% lss 0 set /a s+=24,days-=1
- set /p= 离2008北京奥运开幕还有%days%天%s%小时%f%分%m%秒%hm%毫秒<nul
- set /p=%cls%<nul
- set n=0&set days=0&goto begin
复制代码
|