| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 687 人关注过本帖
标题:C语言冒泡问题,乱数问题。
取消只看楼主 加入收藏
我是含羞草
Rank: 1
等 级:新手上路
帖 子:9
专家分:0
注 册:2015-5-18
结帖率:60%
收藏
已结贴  问题点数:18 回复次数:0 
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!

急求! 在此谢过了,拜托各位!
搜索更多相关主题的帖子: 小游戏 please number C语言 
2015-07-09 15:06
快速回复:C语言冒泡问题,乱数问题。
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.011029 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved