Skip to main content
Commonmark migration
Source Link

QBasic, 151 122 bytes

#QBasic, 151 122 bytes ReallyReally 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

#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

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
replaced http://codegolf.stackexchange.com/ with https://codegolf.stackexchange.com/
Source Link

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

Taking some ABS() inspiration from Joffan's VBA answerJoffan'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

#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

#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
ABS()
Source Link
Chris H
  • 631
  • 3
  • 7

#QBasic, 151151 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

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

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

#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
Source Link
Chris H
  • 631
  • 3
  • 7
Loading