This program need to print all the stage, but only print the number. For example, stage 1- only print 4 1 3 2 16 9 10 14 8 7
input> 4 1 3 2 16 9 10 14 8 7
stage1: 4 1 3 2 16 9 10 14 8 7
stage 2: 4 1 3 2 16 * 9 10 14 8 7
stage 3: 4 1 3 2 * 16 9 10 14 8 7
stage 4: 4 1 3 * 14 16 9 10 2 8 7
stage 5: 4 1 * 10 14 16 9 3 2 8 7
stage 6: 4 * 16 10 14 7 9 3 2 8 1
stage 7: 16 14 10 8 7 9 3 2 4 1
stage 8: 14 8 10 4 7 9 3 2 1 * 16
stage 9: 10 8 9 4 7 1 3 2 * 14 16
stage 10: 9 8 3 4 7 1 2 * 10 14 16
stage 11: 8 7 3 4 2 1 * 9 10 14 16
stage 12: 7 4 3 1 2 * 8 9 10 14 16
stage 13: 4 2 3 1 * 7 8 9 10 14 16
stage 14: 3 2 1 * 4 7 8 9 10 14 16
stage 15: 2 1 * 3 4 7 8 9 10 14 16
stage 16: 1 * 2 3 4 7 8 9 10 14 16
Final stage 17: 1 2 3 4 7 8 9 10 14 16
Thank you
[此贴子已经被作者于2006-10-31 22:07:07编辑过]