英语翻译1.Get value for n2.Set the value of k to 13.While k is l

问题描述:

英语翻译
1.Get value for
n
2.Set the value of
k to 1
3.While k is less than or equal to
n,do steps 4 through
8
4.Set the value of
j to one-half n
5.While j is greater than or equal to
1,do steps 6 through 7
6.Print
the value of j
7 Set the value
of j to one-half its former value
8.Increase
k by 1
9.Stop
请擅长于英语的人帮忙翻译成比较容易理解的语句 最好可以配合简式
1个回答 分类:英语 2014-12-10

问题解答:

我来补答
给n赋值

令k=1
当k<=4时,重复步骤4-8
令j=1/2n
当j>=1时,重复步骤6-7
打印j的值
令j等于原来值的一半(即j=1/2j)
k加1
停止

再问: 第三项 是指做完4-7得出j的值之后然后再在8处k+1, 然后还用不用返回第三项?
 
 
展开全文阅读
剩余:2000