Skip to content

Instantly share code, notes, and snippets.

@hikari-no-yume
Created May 13, 2015 21:54
Show Gist options
  • Save hikari-no-yume/946195f84b6bd7f16ad9 to your computer and use it in GitHub Desktop.
Save hikari-no-yume/946195f84b6bd7f16ad9 to your computer and use it in GitHub Desktop.
Some old code from at least eight years ago. I was younger, then.
dim array(26)
print "Frequently used letters data gatherer."
print "Type what you want and press enter after each line."
print "Type stop and press enter to view results!"
10 input a$
if a$ = "stop" then goto 100
if len(a$) = 0 then a$ = " "
for a = 1 to len(a$)
b$ = upper$(mid$(a$, a, 1))
c = asc(b$) - 64
if c > 26 OR c < 1 then goto 80
array(c) = array(c) + 1
80 next a
goto 10
100 print "Results:"
for a = 1 to 26
print chr$(64 + a); " "; array(a),
b = b + 1
if b = 4 then b = 0: print
next a
print "Press enter to exit"
input b$
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment