Declare Function Vol(as double,as double,as double,as double,as double,as double) as double Declare Function Triangular(as double,as double,as double) as boolean Declare Sub Main() Main End Sub Main dim l(1 to 6) as integer dim j as integer ,k as integer dim nMax as integer Dim ix as integer, nC as longint,nT as longint Dim V as double, Stot as double,Vm as double Dim S1 as double,S2 as double,S3 as double,S4 as double nMax=30 for k=1 to 3 for j=1 to 6: l(j)=1:next j nC=0: nT=0 do nC+=1 if Triangular(l(1),l(2),l(3)) then if Vol(l(1),l(2),l(3),l(4),l(5),l(6))>0 then nT+=1 print l(1);" ";l(2);" ";l(3);" ";l(4);" ";l(5);" ";l(6) end if end if ix=0 do ix+=1 l(ix)+=1 if l(ix)>k then l(ix)=1 else exit do end if loop loop while ix<=6 print k,nT,nC next k end sub Function Vol(a as double, b as double, c as double, aa as double, bb as double, cc as double) As double 'thx Piero della Francesca (a,aa) (b,bb) (c,cc) opposite edges '(a,b,c) identify a triangle, (aa,bb,cc) identify a vertex a=a*a:aa=aa*aa:b=b*b:bb=bb*bb:c=c*c:cc=cc*cc Return a*aa*(b+bb+c+cc-a-aa)+b*bb*(c+cc+a+aa-b-bb)+c*cc*(a+aa+b+bb-c-cc)-(a*b*c+a*bb*cc+aa*b*cc+aa*bb*c) end function Function Triangular(x as double,y as double,z as double) as boolean if x