Saturday 11 October 2014

Riddle Program - Copy and Paste into Notepad and Save As Riddles.bat

@echo off
Title Solve The Riddles
Color 0A

:Start
cls
echo.
echo Solve the riddles to get to the end.
echo.
echo Only use one word answers or you will
echo have to start again from the beginning.
echo.
pause

:Riddle_1
cls
echo.
echo I shake the earth with booming thunder,
echo fell forests whole and homes complete.
echo I influence ships, topple kings,
echo sweep down swift yet remain unseen.
echo.
set /p answer=What am I?
if %answer%==Wind goto Riddle_2
if %answer%==wind goto Riddle_2
goto Riddle_1

:Riddle_2
cls
echo.
echo I'm struck and cut, shaped and cooled,
echo then bound by rings to release what is stored.
echo.
set /p answer=What am I?
if %answer%==Keys goto Riddle_3
if %answer%==keys goto Riddle_3
if %answer%==Key goto Riddle_3
if %answer%==key goto Riddle_3
goto Riddle_2

:Riddle_3
cls
echo.
echo As I was going to St. Ives
echo I met a man with seven wives
echo The seven wives had seven sacks
echo The seven sacks had seven cats
echo The seven cats had seven kits
echo Kits, cats, sacks and wives
echo.
set /p answer=How many were going to St. Ives?
if %answer%==One goto Riddle_4
if %answer%==one goto Riddle_4
if %answer%==1 goto Riddle_4
goto Riddle_5

:Riddle_4
cls
echo.
echo This thing all devours,
echo Birds, beasts, trees, flowers.
echo Gnaws iron, bites steel,
echo Grinds hard stones to meal.
echo Slays king, ruins towns,
echo And beats high mountain down.
echo.
set /p answer=What is it?
if %answer%==Time goto Riddle_5
if %answer%==time goto Riddle_5
goto Riddle_4

:Riddle_5
cls
echo.
echo It is greater than God,
echo More evil than the devil,
echo The poor have it,
echo The rich need it,
echo If you eat it you will die.
echo.
set /p answer=What is it?
if %answer%==Nothing goto Riddle_6
if %answer%==nothing goto Riddle_6
goto Riddle_5

:Riddle_6
cls
echo.
echo There are five houses in five different colours.
echo In each house lives a person with a different
echo nationality. The five owners drink a certain
echo type of beverage, smoke a certain brand of cigar
echo and keep a certain pet. No owners have the same
echo pet, smoke the same brand of cigar or drink the
echo same beverage.
echo.
echo.
echo The Brit lives in the red house.
echo.
echo The Swede keeps dogs as pets.
echo.
echo The Dane drinks tea.
echo.
echo The green house is on the left of the white house.
echo.
echo The green homeowner drinks coffee.
echo.
echo The person who smokes Pall Mall rears birds.
echo.
echo The owner of the yellow house smokes Dunhill.
echo.
echo The man living in the center house drinks milk.
echo.
echo The Norwegian lives in the first house.
echo.
echo The man who smokes Blend lives next to the one
echo who keeps cats.
echo.
echo The man who keeps the horse lives next to the
echo man who smokes Dunhill.
echo.
echo The owner who smokes Bluemaster drinks beer.
echo.
echo The German smokes prince.
echo.
echo The Norwegian lives next to the blue house.
echo.
echo The man who smokes blend has a neighbor who
echo drinks water.
echo.
echo.
set /p answer=Who owns the fish?
if %answer%==German goto End
if %answer%==german goto end
goto Riddle_6

:End
cls
echo.
echo You have completed all the riddles.
echo.
echo Well Done
echo.
pause
exit

No comments:

Post a Comment