早教吧 育儿知识 作业答案 考试题库 百科 知识分享

1.添加,减号.键盘输入N,在123456789之间添上“+”,“-”后使等式成立.例如:N=1,输出1+2+3+4-5+6+7-8-9=1.程序:inputnfori=1to9a(i)=:b(i)=0:nextic$(0)="+"dowhilefor

题目详情
1.添加,减号.键盘输入N,在123456789之间添上“+”,“-”后使等式成立.例如:N=1,输出1+2+3+4-5+6+7-8-9=1.程序:
input n
for i = 1 to 9
a(i) = _________:b(i)=0:next i
c$(0)="+"
_________________
do while _______
_________________
for i = 2 to 9
if b(i) = o then s = s + a(i) else__________
next i
if_____then print a(i);
for j = 2 to 9
print _______;a(j);
next j
print"=";n
end if
k = 9
do while_________
______________
__________
loop
b(k) = _____________
loop
2.下面这段程序假设输入的都是两位整数
dim a(10),temp(10),order(10)
for i = 1 to 10
input a(i)
next
for i = 1 to 10
for j=1 to 10
temp (i,j)=0
next j,i
for i = 1 to 10
order(i) = 0
next
k = 1
n = 1
while n
▼优质解答
答案和解析
我段,你打我电话,我告诉你