- @echo off
- :start
- cls
- set /p year=please input year:
- set /a a=%year%%%4
- set /a b=%year%%%100
- set /a c=%year%%%400
- if %c%==0 echo. &echo %year% is Leap Year! &echo. & pause & goto start
- if %a%==0 (goto next) else (goto norn)
- :next
- if not %b%==0 (echo. & echo %year% is Leap Year! & echo. & pause & goto start) else (goto norn)
- :norn
- echo.
- echo %year% is not Leap Year!
- echo.
- pause
- goto :start
复制代码
|