windows下bat批处理根据输入年月日输出属相和星座
来源:互联网 发布:vue写的案例源码 编辑:程序博客网 时间:2024/05/03 11:21
@echo offsetlocal enabledelayedexpansiontitle=算命大师set shengxiao=猴鸡狗猪鼠牛虎兔龙蛇马羊:startset /p birthday=请输入出生年月日(如19970731):if %birthday:~0,1%==0 (set /a year=%birthday:~1,3%) else (set /a year=%birthday:~0,4%)if %birthday:~4,1%==0 (set /a month=%birthday:~5,1%) else (set /a month=%birthday:~4,2%)if %birthday:~6,1%==0 (set /a day=%birthday:~7,1%) else (set /a day=%birthday:~6,2%)if %month% gtr 13 (echo 请输入正确的月份 & goto end)if %day% gtr 32 (echo 请输入正确的日期 & goto end)set /a yy=%year%%%12echo 你属!shengxiao:~%yy%,1!if %birthday:~4,1%==0 (set /a monthAndDay=%birthday:~5,3%) else (set /a monthAndDay=%birthday:~4,4%)if %monthAndDay% leq 119 echo 摩羯座 & goto endif %monthAndDay% leq 218 echo 水瓶座 & goto endif %monthAndDay% leq 320 echo 双鱼座 & goto endif %monthAndDay% leq 420 echo 白羊座 & goto endif %monthAndDay% leq 520 echo 金牛座 & goto endif %monthAndDay% leq 621 echo 双子座 & goto endif %monthAndDay% leq 722 echo 巨蟹座 & goto endif %monthAndDay% leq 822 echo 狮子座 & goto endif %monthAndDay% leq 922 echo 处女座 & goto endif %monthAndDay% leq 1022 echo 天秤座 & goto endif %monthAndDay% leq 1121 echo 天蝎座 & goto endif %monthAndDay% leq 1221 echo 射手座 & goto endif %monthAndDay% gtr 1221 echo 摩羯座 & goto end:endpausegoto start
运行效果截图如下:
0 0
- windows下bat批处理根据输入年月日输出属相和星座
- 获取星座和属相
- 获取星座和属相
- 获取星座和属相
- 根据输入年月日输出周几
- windows下bat批处理中%cd%和%~dp0的区别
- 根据你的出生计算你的星座与属相
- 根据日期字符串或者日期求出星座及属相。
- iOS_根据出生年月日算出星座
- windows下bat批处理实现守护进程
- windows下bat批处理实现守护进程
- windows下bat批处理实现守护进程
- Java通过出生日期计算属相(生肖)和星座
- 【java】根据身份证,输出年月日
- windows批处理(.bat)
- windows bat批处理函数
- FTP unix下put & windows下bat批处理get总结
- windows下bat批处理实现守护进程(有日志)
- MySQL锁定状态查看命令
- Ueditor1.4.3版本多图上传中的在线管理BUG
- poj 3280 Cheapest Palindrome DP
- APP的缓存文件到底应该存在哪?看完这篇文章你应该就自己清楚了
- JDBC(PreparedStatement)--Select List Record
- windows下bat批处理根据输入年月日输出属相和星座
- VirtualBox中Centos系统使用技巧(随用随记)
- CString/string 区别及其转化
- appstore 上传新版本(一)
- 线程基础相关
- JDBC(PreparedStatement)--Delete Record
- 接口和抽象类有什么区别
- MySQL备份数据
- 阅读《你的知识需要管理》一书之建立你的知识库