bat 十进制转16进制
@echo off
set code=0123456789ABCDEF
:enter
set /p num=输入你要转换的十进制数字:
echo %num%|findstr "[^0-9]"&&goto enter
set var=%num%
:again
set /a tra=%var%%%16
call,set tra=%%code:~%tra%,1%%
set /a var/=16
set str=%tra%%str%
if %var% geq 16 goto again
echo %var%%str%
pause