[新手上路]批处理新手入门导读[视频教程]批处理基础视频教程[视频教程]VBS基础视频教程[批处理精品]批处理版照片整理器
[批处理精品]纯批处理备份&还原驱动[批处理精品]CMD命令50条不能说的秘密[在线下载]第三方命令行工具[在线帮助]VBScript / JScript 在线参考
返回列表 发帖
  1. @echo off
  2. :start
  3. cls
  4. set /p year=please input year:
  5. set /a a=%year%%%4
  6. set /a b=%year%%%100
  7. set /a c=%year%%%400
  8. if %c%==0 echo. &echo %year% is Leap Year! &echo. & pause & goto start
  9. if %a%==0 (goto next) else (goto norn)
  10. :next
  11. if not %b%==0 (echo. & echo %year% is Leap Year! & echo. & pause & goto start) else (goto norn)
  12. :norn
  13. echo.
  14. echo %year% is not Leap Year!
  15. echo.
  16. pause
  17. goto :start
复制代码
1

评分人数

(*^_^*)

TOP

返回列表