CLEAR MEMORY DIMENSION X(100) FOR I= 1 TO 100 X(I)=I^(1/3) ENDFOR
DISPLAY MEMORY LIKE X* TO FILE ROOT SET TALK ON RETURN
X2X4X62、近似计算COS(X)= 1?????2!4!6!
-6
(X为弧度,计算精度为10)
SET TALK OFF
INPUT \请输入计算余弦函数值的弧度值:\I=0 S=1 N=1
DO WHILE ABS(N)>=1E-6 I=I+2
N=-N*X*X/((I-1)*I) S=S+N ENDDO ? S
SET TALK ON 解2
input \请输入x值:\ s=1 k=1 i=0 t=1
do while abs(x^i/k*(-1)^t)>=1e(-6) i=i+2 k=1
for j=1 to i k=k*j endfor
s=s+x^i/k*(-1)^t t=t+1 enddo ?s
2007年重庆市普通高校专升本统一选拔考试题
CLEARMEMORYDIMENSIONX(100)FORI=1TO100X(I)=I^(1/3)ENDFORDISPLAYMEMORYLIKEX*TOFILEROOTSETTALKONRETURNX2X4X62、近似计算COS(X)=1?????2!4!6!-6(X为弧度,计算精度为
推荐度:
点击下载文档文档为doc格式