这个用批处理就能搞定,把下面的批处理存为rand_exp.bat,就能实现随机100内2个整数的和,及结果正误检查。
@echo off@set /a a=%random%%%100@set /a b=%random%%%100@set /a r=%a%+%b%@set /p uranswer=Please input your calc result of %a%+%b%:@if %uranswer%==%r% (@echo Yes, you are right!) else (@echo Sorry, please try another time!)
Copyright © 2025 IZhiDa.com All Rights Reserved.
知答 版权所有 粤ICP备2023042255号