cls 3 dim n As Byte dim a As DWORD dim c As Byte dim x As Byte dim y As Byte dim z As Byte dim x_offset As WORD dim y_offset As WORD input "一辺の数を入力しなさい (5〜30あたりが無難) ";n a=0 locate 0,1 :print "合計 個" for z=n to 1 step -1 c=z Mod 7 +1 y_offset=10*(n-z)+10 for y=z to 1 step -1 x_offset=10*(n-y)+50 for x=y to 1 step -1 circle (x*20+x_offset,y*17+y_offset),10,0,,,,f,c a=a+1 if n<11 then locate 4,1:print a sleep 100 end if next x next y locate 4,1:print a next z input "Push ENTER to exit.",n