我的代码怎么放到VB里面就错了呢?怎么都运行不了,怎么在VB里面实现这个功能?
我的代码怎么放到VB里面就错了呢?怎么都运行不了,怎么在VB里面实现这个功能?Dbfdbl A-H,O-Z
DECLARE FUNCTION Y(T)
DIM SHED A(20),B(20),C(20)
CLS
INPUT “A0 =”;A0:INPUT “H =”,H:INPUT “E =”,E
PRINT “A0 =”;A0:PRINT “H =”;H:PRINT “E =”;E
OKstop=1
DO WHILE OKstop >0
X1 =X0+H:T=YI:Y1=T(Y)
OKstop=Y1*Y0
IF OKstop >0 THEN
X0=X1:Y0=Y1
END IF
LOOP
PRINT “No.T[K]”
OKstop =100*E:I=0:T=X0:YD0=YD(T)
DO WHILE OKstop >E
I=I+1
X1=X0-Y0/YD0
T=X1:YI=Y(T):YD1=YD(T)
PRINT USING “####”;I;
PRINT USING “########.###”;X1
OKstop=ABS(X1-X0)
X0=X1:Y0=Y1:YD0=YD1
LOOP
END
FUNCTION Y(T)
Y=21.8239-34870.3/T-5.081*LOG(T)/LOG(10)
END FUNCTION
FUNCTION YD(T)
YD=3480.3/T/T-2.2067/T
END FUNCTION
[ 本帖最后由 xz3501 于 2010-1-7 22:54 编辑 ]