September 2017 Update
This commit is contained in:
parent
bba7bfd280
commit
ba8067c3b7
14570 changed files with 153136 additions and 63871 deletions
24
Task/ABC-Problem/BaCon/abc-problem.bacon
Normal file
24
Task/ABC-Problem/BaCon/abc-problem.bacon
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
CONST info$ = "BO XK DQ CP NA GT RE TG QD FS JW HU VI AN OB ER FS LY PC ZM"
|
||||
|
||||
DATA "A", "BARK", "BOOK", "TREAT", "Common", "Squad", "Confuse"
|
||||
|
||||
WHILE TRUE
|
||||
READ word$
|
||||
|
||||
IF NOT(LEN(word$)) THEN BREAK
|
||||
|
||||
block$ = info$
|
||||
|
||||
count = AMOUNT(block$)
|
||||
|
||||
FOR y = 1 TO LEN(word$)
|
||||
FOR x = 1 TO AMOUNT(block$)
|
||||
IF TALLY(TOKEN$(block$, x), MID$(UCASE$(word$), y, 1)) THEN
|
||||
block$ = DEL$(block$, x)
|
||||
BREAK
|
||||
END IF
|
||||
NEXT
|
||||
NEXT
|
||||
|
||||
PRINT word$, IIF$(LEN(word$) = count-AMOUNT(block$), "True", "False") FORMAT "%-10s: %s\n"
|
||||
WEND
|
||||
Loading…
Add table
Add a link
Reference in a new issue