IBM SC34-5764-01 Instrukcja Użytkownika Strona 112

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 481
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 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
Przeglądanie stron 111
1 2 ... 107 108 109 110 111 112 113 114 115 116 117 ... 480 481

Komentarze do niniejszej Instrukcji

Brak uwag