题目: 下面是计算2+4+6+…+100之和的程序。SET TALK OFF***********SPACE**********【?】***********SPACE**********FOR I=2 TO 100 【?】S=S+IENDFOR***********SPACE**********?"结果=",【?】RETURN
查看答案
题目: 下面是计算1+3+5+…+99之和的程序。SET TALK OFF***********SPACE**********【?】***********SPACE**********FOR I=1 TO 99 【?】S=S+IENDFOR***********SPACE**********?"结果="+【?】4)RETURNSET TALK ON
题目:从键盘上输入5个数,统计其中奇数的个数。在*******FOUND******的下一行有错误,直接在错误处改正。SET TALK OFFA=0FOR J=1 TO 5**********FOUND**********accept TO M**********FOUND**********IF INT(M/2)=M/2A=A+1ENDIFENDFOR? “奇数个数是”,ACANCEL
题目:求出1到100之间的奇数积、偶数和。SET TALK OFF***********SPACE**********【?】s2=1FOR I=1 to 100***********SPACE**********IF MOD(i,2)=【?】s1=s1+IElse***********SPACE**********s2【?】ENDIFNEXT?" 奇数积为:",s2?"偶数和为:",s1SET TALK ON
功能:以下程序的功能如(图1)。*-------------------------------------------------------程序输入N的值,求T=1+2+22+23+…+2N的值。SET TALK OFF***********SPACE**********【?】***********SPACE**********【?】 TO NFOR I=0 TO N***********SPACE**********T=T+【?】ENDFOR?"T的值是:",TSET TALK ONRETURN