| 发表于:2007-01-22 15:00:201楼 得分:10 |
程序员试题 private sub form_click() dim i, j, c as integer, strtemp as string dim a(9) as integer a(0) = 0 a(1) = 1 strtemp = str(a(1)) + space(3) currentx = (scalewidth - textwidth(strtemp)) / 2 print strtemp for j = 2 to 9 a(j) = 1 for c = j - 1 to 2 step -1 a(c) = a(c) + a(c - 1) next strtemp = " " for c = 1 to j strtemp = strtemp & str(a(c)) & space(5 - len(str(a(c)))) next currentx = (scalewidth - textwidth(strtemp)) / 2 print strtemp next end sub | | |
|