uses console

print "hypercube series: 1 to 8 dimensions"cr cr
print "dims" tab "points" tab "lines" tab "faces" tab "volumes"
print tab "p4" tab "p5" tab "p6" tab "p7" tab "p8" cr cr
dim int a[8,9]
int y,x
a[1,1]=2
a[1,2]=1
for y=2 to 8
  a[y,1]=a[y-1,1]*2
  for x=2 to 9
    a[y,x]=a[y-1,x]*2 + a[y-1,x-1]
  next
next
for y=1 to 8
  print y
  for x=1 to 9
    print tab a[y,x]
  next
  print cr
next
print cr
wait
