文件名称:passrive
-
所属分类:
- 标签属性:
- 上传时间:2012-12-23
-
文件大小:12.59kb
-
已下载:0次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
编程完成商人过河游戏:有三个商人带着三个随从和货物过河,船每次最多只能载两个人,由他们自己划行,并且如何乘船渡河的大权由商人掌握。要求保证在过河期间的任一岸上商人的人数要大于或等于随从的人数,否则随从会*商人抢走货物。设计一个符合上述要求的商人过河的游戏。要求程序运行效果如下图。
(1)有游戏规则提示,按任意键开始游戏,按“Q”键退出游戏;
(2)程序开始,分别提示每次从河岸这边到那边、从河岸那边到这边的商人和随从人数;
(3)如果输入错误(如一次输入的人数不得超过2个、过河的人数不得超过2个),则提示错误并且按任意键重新开始游戏;
(4)当任一河岸的商人数小于随从数时,提示商人被杀,按任意键继续游戏;
(5)当游戏成功时提示游戏成功,按任意键结束游戏。-Programming complete businessman across the river game: there are three businessmen with three follow and cargo across the river, the ship most every time can only take two people, by their own oar, and how to cross the river by boat power by businessmen master. Requirements that the river during the period of the number of any shore businessman than or equal to the number of people followed, otherwise follow will kill traders take goods. Design a meet above requirement businessman across the river of the game. For program execution effect as the chart.
(1)有游戏规则提示,按任意键开始游戏,按“Q”键退出游戏;
(2)程序开始,分别提示每次从河岸这边到那边、从河岸那边到这边的商人和随从人数;
(3)如果输入错误(如一次输入的人数不得超过2个、过河的人数不得超过2个),则提示错误并且按任意键重新开始游戏;
(4)当任一河岸的商人数小于随从数时,提示商人被杀,按任意键继续游戏;
(5)当游戏成功时提示游戏成功,按任意键结束游戏。-Programming complete businessman across the river game: there are three businessmen with three follow and cargo across the river, the ship most every time can only take two people, by their own oar, and how to cross the river by boat power by businessmen master. Requirements that the river during the period of the number of any shore businessman than or equal to the number of people followed, otherwise follow will kill traders take goods. Design a meet above requirement businessman across the river of the game. For program execution effect as the chart.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
商人过河游戏/207.C
商人过河游戏/207.EXE
商人过河游戏
商人过河游戏/207.EXE
商人过河游戏
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.