Ⅰ 用VB做一個簡單的小程序
PrivateSubCommand1_Click()Me.ClsDimNAsInteger,iAsIntegerN=InputBox("n=",,9)Fori=1To2*N-1Ifi<=NThenPrintSpace(N-i)+String(2*i-1,CStr(i))ElsePrintSpace(N-(2*N-i))+String(2*(2*N-i)-1,CStr(2*N-i))EndIfNextiEndSub