-
Notifications
You must be signed in to change notification settings - Fork 0
/
speaker.f90
45 lines (34 loc) · 1.44 KB
/
speaker.f90
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
PROGRAM speaker
! PROGRAM speaker
! by Buckingham U. Badger
!
! This program prints something depending on the dialogue number provided.
!
! Created 02/10/17 BUB
IMPLICIT NONE
INTEGER :: dialoguenumber
! | | !
! \|/ We need to ask for the dialogue number here \|/ !
! /|\ We need to ask for the dialogue number here /|\ !
! | | !
! Here we print out the requested dialogue number.
IF (dialoguenumber .EQ. 1) THEN
PRINT *, "Winter is coming."
ELSE IF (dialoguenumber .EQ. 2) THEN
PRINT *, "These are not the droids you are looking for."
ELSE IF (dialoguenumber == 3) THEN
PRINT *, "That _is_ a tasty burger."
ELSE IF (dialoguenumber == 4) THEN
PRINT *, "I'm the king of the world."
ELSE IF ((dialoguenumber .EQ. 5) .OR. (dialoguenumber .EQ. 6)) THEN
PRINT *, "I'm the greatest botanist on this planet."
ELSE IF ((dialoguenumber .EQ. 7) .OR. (dialoguenumber .EQ. 8) .OR. (dialoguenumber .EQ. 9)) THEN
PRINT *, "So I guess I'm out of the book club."
ELSE IF ((dialoguenumber .EQ. 1) .AND. (dialoguenumber .EQ. 9)) THEN
! This will never happen because a single variable cannot equal two numbers
PRINT *, "A wormhole's not a naturally occurring phenomenon."
ELSE
! In the event the user specify a number that is not a part of our dialogue
PRINT *, "Sorry, but that dialogue--", dialoguenumber, "--does not exist."
END IF
END PROGRAM