回复 1# wosliming - @echo off
- setlocal enabledelayedexpansion
- color 0f
- mode con cols=55 lines=25
- :main
- set /p n=请输入:
- for /l %%r in (1 1 2) do (
- set /a r=n%%16
- if !r! equ 10 (set r=A)
- if !r! equ 11 (set r=B)
- if !r! equ 12 (set r=C)
- if !r! equ 13 (set r=D)
- if !r! equ 14 (set r=E)
- if !r! equ 15 (set r=F)
- set nm=!r!!nm!
- set /a n=n/16
- if !n! equ 0 (
- if "!nm:~1!"=="" (set "nm=0!nm!")
- echo,!nm! &set "nm=" &pause>nul
- goto main
- )
- )
复制代码
|