Advertisement
FuFsQ

4.1 c)

Sep 28th, 2021
1,115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pascal 0.67 KB | None | 0 0
  1. PROGRAM PaulRevere(INPUT, OUTPUT);
  2. {Печать соответствующего сообщения, зависящего от величины
  3. на входе:  '...by land' для L и '...by sea' для LL
  4. иначе печать сообщения об ошибке}
  5. VAR
  6.   Lanterns: CHAR;
  7. BEGIN {PaulRevere}
  8.   {Read Lanterns}
  9.   READ(Lanterns);
  10.   {Issue Paul Revere's message}
  11.   IF Lanterns = 'L'
  12.   THEN
  13.     BEGIN
  14.       READ(Lanterns);
  15.       IF Lanterns = 'L'
  16.       THEN
  17.         WRITE('The British are coming by sea.')
  18.       ELSE
  19.         WRITE('The British are coming by land');
  20.     END
  21.   ELSE
  22.     WRITE('The North Church shows nothing')
  23. END. {PaulRevere}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement