IBM SC34-5764-01 Uživatelský manuál Strana 112

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 481
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 111
Answer:
Happy Hour
Here is a chance to have some fun.
This is a very simple arcade game. Type it in and play it with your friends. Later in this chapter, you may
want to improve it.
/* CON EXEC */
/* Tossing a coin. The machine is lucky, not the user */
do forever
say "Let's play a game! Type 'Heads', 'Tails'",
"or 'Quit' and press ENTER."
pull answer
select
when answer = "HEADS"
then say "Sorry! It was TAILS. Hard luck!"
when answer = "TAILS"
then say "Sorry! It was HEADS. Hard luck!"
when answer = "QUIT"
then exit
otherwise
say "That's not a valid answer. Try again!"
end
say
end
Programming Style and Techniques
90
CICS TS for VSE/ESA: REXX Guide
Zobrazit stránku 111
1 2 ... 107 108 109 110 111 112 113 114 115 116 117 ... 480 481

Komentáře k této Příručce

Žádné komentáře