vb中如何定義復數數組?
不用二維數組,用三個一維數組比較容易處理,例如:DIM A(20) AS STRING,B(20) AS INTEGER,C(20) AS INTEGER,I AS INTEGER(其中數組A是復數,數組B代表實數部分,數組C代表虛數部分)A(0)=Cstr(B(0)) & "+ " & Cstr(C(0)) & "i"當然用循環更加方便:FOR I=0 TO 20A(I)=Cstr(B(I)) & "+ " & Cstr(C(I)) & "i"NEXT I
vb中如何定義復數數組?
不用二維數組,用三個一維數組比較容易處理,例如:DIM A(20) AS STRING,B(20) AS INTEGER,C(20) AS INTEGER,I AS INTEGER(其中數組A是復數,數組B代表實數部分,數組C代表虛數部分)A(0)=Cstr(B(0)) & "+ " & Cstr(C(0)) & "i"當然用循環更加方便:FOR I=0 TO 20A(I)=Cstr(B(I)) & "+ " & Cstr(C(I)) & "i"NEXT I