Commit fb809246 by BellCodeEditor

save project

parent c1911b8c
Showing with 35 additions and 2 deletions
hello world
\ No newline at end of file
alist = [88, 75, 72, 82, 90, 85, 78, 91] a=[20,17,9,13,5,6]
\ No newline at end of file n=len(a)
for i in range(n-1):
flag=1
for j in range(n-1-i):
if a[j] < a[j+1]:
c=a[j]
a[j]=a[j+1]
a[j+1]=c
flag=0
if flag==1:
break
else:
print("第",i+1,"轮的排序结果是:",a)
print("最终的排序结果是:",a)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment