Untitled Diagram
2015-11-11 19:32:57 0 举报
For-Loop Model
作者其他创作
大纲/内容
flag = false
No and call by Main
i n ?
i++
Loop variable i = 0
Noandcall by BubbleSort
Start
End
a = b
j n - 1 ?
Output i-th element
Hint:\"The sort result:\"
j++
Swap the j-th elementand the j+1-th
flag = truerepresenting that sorting have completed
Hint:\"----------------------------\"
No
Hint:\"The i round:\"
BubbleSort
flag ?
Input n
b = temp(b = a's original value)
Yes
false
Temporary variable temp = a
Input i-th element of the array
Hint\"How many numbers you want to input ? (less than 100)\"
Inner loop variable j = 0
the j-th elementis bigger thanthe j+1-th?
Hint\
收藏
收藏
0 条评论
下一页