本帖最后由 happy886rr 于 2017-4-3 14:24 编辑
回复 6# 渣白
这么简单你还不会写吗- @echo off
- setlocal enabledelayedexpansion
-
- :INPUT
- set/p a=请输入(48位数字):
-
- for /l %%i in (0,1,48) do (
- set/a "1!a:~%%i,1!1+1!a:~%%i,1!" 2>NUL || (
- echo;输入错误!请重新输入!
- goto :INPUT
- )
- )
-
- set/a "1/(1!a:~47,1!1-11)" 2>NUL || (
- echo;输入错误!请重新输入!
- goto :INPUT
- )
-
- set/a "1/(1!a:~48,1!1-11)" 2>NUL && (
- echo;输入错误!请重新输入!
- goto :INPUT
- )
-
- set/p=输入成功
复制代码
|