s=1+22+333+4444+.+nnnn.n(n=1到9),我知道算法是input"n=" to nx=0for i=1 to ns=0for j=1 to is=s+i*10^(j-1)endforx=x+sendforreturn可是X和S代表的是什么,
来源:学生作业帮助网 编辑:作业帮 时间:2024/06/29 01:16:09
![s=1+22+333+4444+.+nnnn.n(n=1到9),我知道算法是input](/uploads/image/z/6962322-66-2.jpg?t=s%3D1%2B22%2B333%2B4444%2B.%2Bnnnn.n%28n%3D1%E5%88%B09%EF%BC%89%2C%E6%88%91%E7%9F%A5%E9%81%93%E7%AE%97%E6%B3%95%E6%98%AFinput%22n%3D%22+to+nx%3D0for+i%3D1+to+ns%3D0for+j%3D1+to+is%3Ds%2Bi%2A10%5E%28j-1%29endforx%3Dx%2Bsendforreturn%E5%8F%AF%E6%98%AFX%E5%92%8CS%E4%BB%A3%E8%A1%A8%E7%9A%84%E6%98%AF%E4%BB%80%E4%B9%88%2C)
s=1+22+333+4444+.+nnnn.n(n=1到9),我知道算法是input"n=" to nx=0for i=1 to ns=0for j=1 to is=s+i*10^(j-1)endforx=x+sendforreturn可是X和S代表的是什么,
s=1+22+333+4444+.+nnnn.n(n=1到9),
我知道算法是
input"n=" to n
x=0
for i=1 to n
s=0
for j=1 to i
s=s+i*10^(j-1)
endfor
x=x+s
endfor
return
可是X和S代表的是什么,
s=1+22+333+4444+.+nnnn.n(n=1到9),我知道算法是input"n=" to nx=0for i=1 to ns=0for j=1 to is=s+i*10^(j-1)endforx=x+sendforreturn可是X和S代表的是什么,
s代表1,22,333,...,x代表1,1+22,1+22+333,...