C语言冒泡问题,乱数问题。
得出一下程序:please input array number
123456789
reverse:987654321
please input array number
48696523
reverse:32569684
乱数的小游戏,得出以下程序:
例一:
please input sword number:5
1 2 3 4 5
[ ] [ ] [ ] [ ] [ ]
please choose a hole to stab the sword:1
1 2 3 4 5
[|] [ ] [ ] [ ] [ ]
please choose a hole to stab the sword:3
Pop up!
例二:
please input sword number:5
1 2 3 4 5
[ ] [ ] [ ] [ ] [ ]
please choose a hole to stab the sword:1
1 2 3 4 5
[|] [ ] [ ] [ ] [ ]
please choose a hole to stab the sword:2
1 2 3 4 5
[|] [|] [ ] [ ] [ ]
please choose a hole to stab the sword:4
1 2 3 4 5
[|] [|] [ ] [|] [ ]
please choose a hole to stab the sword:5
Pop up!
急求! 在此谢过了,拜托各位!