You are viewing our Forum Archives. To view or take place in current topics click here.
Number Guessing Game! ( CMD )
Posted:

Number Guessing Game! ( CMD )Posted:

Console
  • TTG Senior
Status: Offline
Joined: Sep 18, 201014Year Member
Posts: 1,274
Reputation Power: 72
Status: Offline
Joined: Sep 18, 201014Year Member
Posts: 1,274
Reputation Power: 72
Hey guys i know its not really programing but hey...




@echo off
color 09
title Guessing Game by Console
set /a guessnum=0
set /a answer=%RANDOM%
set variable1=surf33
echo --
echo Welcome to the Number Guessing Game!
echo.
echo Try and Guess my Number!
echo --
echo.
:top
echo.
set /p guess=
echo.
if %guess% GTR %answer% ECHO Lower!
if %guess% LSS %answer% ECHO Higher!
if %guess%==%answer% GOTO EQUAL
set /a guessnum=%guessnum% +1
if %guess%==%variable1% ECHO Welcome Thunder Number

Guessing Game, the answer is: %answer%
goto top
:equal
echo Congratulations, You guessed right!!!
echo.
echo It took you %guessnum% guesses.
echo.
pause





Tut:
First Open Notepad, Then Paste The Code In,
Next Save As And Save It As "Anything.BAT"





Thanks Hope You Like, Feel free to thank the topic.
#2. Posted:
flop
  • TTG Senior
Status: Offline
Joined: Jul 21, 201014Year Member
Posts: 1,423
Reputation Power: 66
Status: Offline
Joined: Jul 21, 201014Year Member
Posts: 1,423
Reputation Power: 66
I won! It took me 21 guesses!
#3. Posted:
Console
  • V5 Launch
Status: Offline
Joined: Sep 18, 201014Year Member
Posts: 1,274
Reputation Power: 72
Status: Offline
Joined: Sep 18, 201014Year Member
Posts: 1,274
Reputation Power: 72
o______O wrote I won! It took me 21 guesses!


Nice Job! Dude one time it took me like 100.
Jump to:
You are viewing our Forum Archives. To view or take place in current topics click here.