(如果我写了不好的东西,我会编辑或删除这篇文章)所以我有这段代码,我似乎无法正确完成。看看吧。
set /a num=%random% %%9 +1
set /p start="Do you want to start? "
if %start% ==yes goto %random%
if %start% ==no exit
:1
echo Tu turi %score% tasku (-us)!
set /p answer="6 x 5 = "
if %answer% equ 30 (
echo Teisingai! Gavai 1 taska!
set /a score+=1
echo %score% > %player%.sav
) else (
echo Neteisingai :( Atsakymas buvo %answer%!
echo %score% > %player%.sav
)
:2
echo Tu turi %score% tasku (-us)!
set /p answer="123 x 3 = "
if %answer% equ 369 (
echo Teisingai! Gavai 1 taska!
set /a score+=1
echo %score% > %player%.sav
) else (
echo Neteisingai :( Atsakymas buvo %answer%!
echo %score% > %player%.sav
)
:3
echo Tu turi %score% tasku (-us)!
set /p answer="-93128 + 993128 = "
if %answer% equ 900000 (
echo Teisingai! gavai 5 taskus!
set /a score+=5
echo %score% > %player%.sav
) else (
echo Neteisingai :( Atsakymas buvo %answer%!
echo %score% > %player%.sav
)
:4
echo Tu turi %score% tasku!
set /p answer="35734534757357 x 0 = "
if %answer% equ 0 (
echo Teisingai! gavai 2 taskus!
set /a score+=2
echo %score% > %player%.sav
) else (
echo Neteisingai :( Atsakymas buvo %answer%!
echo %score% > %player%.sav
)
:5
echo Tu turi %score% tasku!
set /p answer="6 + 8 x 3 = "
if %answer% equ 30 (
echo Teisingai! gavai 3 taskus!
set /a score+=3
echo %score% > %player%.sav
) else (
echo Neteisingai :( Atsakymas buvo %answer%!
echo %score% > %player%.sav
)
:6
echo Tu turi %score% tasku!
set /p answer="X + 1234 = 2468. Koks skaicius yra X?"
if %answer% equ 1234 (
echo Teisingai! gavai 4 taskus!
set /a score+=4
echo %score% > %player%.sav
) else (
echo Neteisingai :( Atsakymas buvo %answer%!
echo %score% > %player%.sav
)
:7
echo Tu turi %score% tasku!
set /p answer="-9 x -9 = "
if %answer% equ 81 (
echo Teisingai! gavai 5 taskus!
set /a score+=5
echo %score% > %player%.sav
) else (
echo Neteisingai :( Atsakymas buvo %answer%!
echo %score% > %player%.sav
)
:8
echo Tu turi %score% tasku!
set /p answer="1 + 1 x (111 x 3) = "
if %answer% equ 666 (
echo Teisingai! gavai 6 taskus!
set /a score+=6
echo %score% > %player%.sav
) else (
echo Neteisingai :( Atsakymas buvo %answer%!
echo %score% > %player%.sav
)
:9
echo Tu turi %score% tasku!
set /p answer="634745645634576456457645657 x 0 = "
if %answer% equ 0 (
echo Teisingai! gavai 2 taskus!
set /a score+=2
echo %score% > %player%.sav
) else (
echo Neteisingai :( Atsakymas buvo %answer%!
echo %score% > %player%.sav
)
它主要是用不同的语言。对不起。基本上我想做到,所以如果你在开头写“是”,它会去一个随机的数学问题(从 1 到 9)。我希望有人能理解这一点,因为我不擅长解释事情:(