n=6: c=0: d=0: st=1: ed=n
Do While st < ed
c=c+1
For j=st To ed- 1
d=d+1
If a(j)> a(j+ 1) Then
tmp = a(j): a(i)=a(j+1): a(j+1)= tmp
ed=j
End If
Next j
For j=ed To st+1 Step-1
d=d+ 1
If a(j)< a(j- 1) Then
tmp= a(j): a(i)=a(j- 1): a(j- 1)= tmp
st=j
End If
Next j
Loop
数组元素a(1)到a(6)的值依次为“5,6,12,15,10,8”,程序结束时,c和d的值分别为( )