编程计算题,求详解 SET TALK OFF CLEAR STORE 1 TO S,I,J DO WHILE I
来源:学生作业帮助网 编辑:六六作业网 时间:2024/11/15 09:06:55
编程计算题,求详解SETTALKOFFCLEARSTORE1TOS,I,JDOWHILEI编程计算题,求详解SETTALKOFFCLEARSTORE1TOS,I,JDOWHILEI编程计算题,求详解S
编程计算题,求详解 SET TALK OFF CLEAR STORE 1 TO S,I,J DO WHILE I
编程计算题,求详解 SET TALK OFF CLEAR STORE 1 TO S,I,J DO WHILE I
编程计算题,求详解 SET TALK OFF CLEAR STORE 1 TO S,I,J DO WHILE I
SET TALK OFF 关闭屏幕显示,也就是不把程序显示在画面里
CLEAR 清屏幕
STORE 1 TO S,I,J 赋值 s i j 都等于1
DO WHILE II 子循环 ,直到J小于等于i时退出循环
S=S+I+J 累加
J=J-5 调整J
ENDDO 返回子循环
I=I+5 调整I
ENDDO 返回大循环
?”S=”,S 打印 S= 累加值
SET TALK ON 打开屏幕显示
RETURN 程序结束.
整个程序中 i 会有两个值 1,6 ,J会有 1,10,5,10,5的变化.需要注意的是,第二次循环时,J初始状态是5.