لوزی خیام پاسکال
DECLARE FUNCTION fact! (a!)
CLS
INPUT p
p = p - 1
x = p + 1
FOR i = 0 TO 2 * p
FOR j = 0 TO ABS(p - i)
PRINT " ";
NEXT j
x = x - 1
s = ABS(p - ABS(x))
FOR k = 0 TO s
PRINT USING "##"; fact(s) / (fact(k) * fact(s - k));
PRINT " ";
NEXT k
PRINT
PRINT
NEXT i
END
FUNCTION fact (a)
l = 1
FOR j = 1 TO a
l = l * j
NEXT j
fact = l
END FUNCTION