用QBASIC编程实现:输入三个数据,将它们按从小到大的顺序输出
qbasic吧
全部回复
仅看楼主
level 1
静栀庆0B 楼主
跪求:
用QBASIC编程实现:输入三个数据,将它们按从小到大的顺序输出
2012年12月31日 02点12分 1
level 11
dim a(3)
input a(1),a(2),a(3)
for i=1 to 2
for j=i+1 to 3
if a(i)>a(j) then swap a(i),a(j)
next j
next i
for i=1 to 3
write a(i)
next i
end
@ziwei425321
2012年12月31日 06点12分 2
1