VFP编程问题
怎么用VFP解决以下问题:P=1*2*3+4*5*6+7*8*9+。。。。+19*20*21
CLEAR nItems = 7 nLength = 3 nSum = 0 FOR I = 1 TO nItems * nLength STEP nLength nTotal = 1 FOR J = I TO I + 2 ?? TRANSFORM(J) IF J < I + 2 ?? "*" ENDIF nTotal = nTotal * J NEXT nSum = nSum + nTotal IF I < (nItems - 1) * nLength ?? " + " ENDIF NEXT ? "結果 = " + TRANSFORM(nSum)