我试图弄清楚如何编写一个批处理文件行,当玩家回答错误时给出正确答案。
这是我们正在做的游戏的第一行。
SET /p quest1= 1. What was the Six-Million-Dollar Man's first name?
我试图弄清楚如何编写一个批处理文件行,当玩家回答错误时给出正确答案。
这是我们正在做的游戏的第一行。
SET /p quest1= 1. What was the Six-Million-Dollar Man's first name?
@echo off
set /p quest1=" 1. What was the Six-Million-Dollar man's first name? "
echo %quest1%|find /i "Steve">nul
if "%errorlevel%"=="0" (echo Right answer!) else (echo Incorrect answer, was Steve Austin.)
pause>nul
set /pa=what is 2 + 2:
if "%a%" NEQ "4" (echo sorry, 答案是 4)