Answer:

About this task

/* 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

Task Task

Feedback


Timestamp icon Last updated: Tuesday, 7 January 2014


http://pic.dhe.ibm.com/infocenter/cicsts/v5r1/topic/com.ibm.cics.rexx.doc//dfhrx/dfhrx00075.html