Skip to main content
3 of 4
replaced http://codegolf.stackexchange.com/ with https://codegolf.stackexchange.com/

#QBasic, 151 122 bytes Really just for fun (via QB64) - it doesn't golf well

Taking some ABS() inspiration from Joffan's VBA answer but applying it differently:

FOR i=-25 TO 25
FOR n=0 TO 25-abs(i)
s$=s$+chr$(n+65)
IF n THEN t$=t$+chr$(90-abs(i)-abs(n))
NEXT
? s$+t$
s$=""
t$=""
NEXT

Previously:

FOR i=0 TO 25
p(i)
NEXT
FOR i=0 to 25
p(25-i)
NEXT
SUB p(i)
FOR n=0 TO i
s$=s$+chr$(n+65)
IF n THEN t$=t$+chr$(65+i-n)
NEXT
? s$+t$
s$=""
t$=""
END SUB
Chris H
  • 631
  • 3
  • 7