批处理文件显示错过答案的正确答案

时间:2013-10-03 22:34:27

标签: windows batch-file batch-processing

我正在试图找出如何编写批处理文件行,以便在播放器错误地回答问题时给出正确的答案。

以下是我们正在进行的游戏的第一行。

SET /p quest1= 1. What was the Six-Million-Dollar Man's first name?

2 个答案:

答案 0 :(得分:0)

设置/ p a =什么是2 + 2:
如果"%a%" NEQ" 4" (抱歉,答案是4)

答案 1 :(得分:0)

@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