Sorceress

2018-05

Dec 5th, 2018
743
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. DEFLNG A-Z
  2. DIM s(65535) AS LONG
  3.  
  4. OPEN "input05.txt" FOR INPUT AS #1
  5. INPUT #1, r$: L = LEN(r$)
  6. CLOSE #1
  7.  
  8. FOR c = 0 TO 26: p = 0
  9.   FOR i = 1 TO L
  10.     N = ASC(MID$(r$, i, 1))
  11.     IF N <> c + 64 AND N <> c + 96 THEN
  12.       IF ABS(s(p) - N) <> 32 THEN p = p + 1: s(p) = N ELSE p = p - 1
  13.     END IF
  14.   NEXT
  15.   PRINT CHR$(c + 64); p; " | ";
  16. NEXT
RAW Paste Data