登录
首页 » 算法 » 一个简单的c语言实现的纸牌程序

一个简单的c语言实现的纸牌程序

于 2022-01-29 发布 文件大小:217.53 kB
0 201
下载积分: 2 下载次数: 1

代码说明:

用一个具有52个元素的数组(如char p[52][5])存放这52张牌的内容,如P_i表示黑桃、H_i表示红桃、C_i表示梅花、D-i表示方块;程序中可以首先初始化该数组,然后显示菜单等待用户选择输入,用户选择“发牌”,程序调用“发牌”函数;在发牌函数中,可使用C 中的产生随机数的函数(参看rand(),srand(),random()等函数的使用说明)一个随机数m,选取一张牌{p[m]},将其与最前面的牌交换位置,即将选取的牌放在最前面;然后对数组p余下的牌重复选取操作,直到所有牌均重排列;最后按13行*4列输出发牌结果

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • 单个文件在以下链接是可用的:
    Individual files are available in the following links: Bessjy -- Bessel functions Jn and Yn for real argument and integer or real order. Bessik -- Modified Bessel function In and Kn for real argument and integer or real order. CBessjy -- Bessel functions Jv and Yv for real or complex arguments and real order. CBessik -- Modified Bessel functions Iv and Kv for complex arguments and real order. -Individual files are available in the following links: Bessjy- Bessel functions Jn and Yn for real argument and integer or real order. Bessik- Modified Bessel function In and Kn for real argument and integer or real order. CBessjy- Bessel functions Jv and Yv for real or complex arguments and real order. CBessik- Modified Bessel functions Iv and Kv for complex arguments and real order.
    2022-04-29 03:27:40下载
    积分:1
  • 运动驱动程序版本6.1
    移动驱动器6.1版本,支持MPU9250,MPU9150,MPU6050,STM32与MSP430平台上的MPU6500。
    2022-03-04 02:02:11下载
    积分:1
  • harris角点检测
    基于梯度和结构张量的角点检测算法,调试梯度时将结构张量的那部分变成注释,调试结构张量时同理,效果明显,对比度强,程序简单易懂
    2023-06-07 01:45:04下载
    积分:1
  • candide-3人脸模型建模
    candide-3人脸模型建模,candide-3人脸模型建模,candide-3人脸模型建模,candide-3人脸模型建模
    2022-03-18 01:19:56下载
    积分:1
  • 图像分割Graphcut
    Graph Cut方法是基于颜色统计采样的方法,因此对前背景相差较大的图像效果较佳。同时,比例系数lambda的调节直接影响到最终的分割效果。
    2023-07-31 21:30:02下载
    积分:1
  • Fuzzylogic is programmed by VB,simple,but the algorithm of it is deserved to hav...
    模糊逻辑的VB实现,简单,但是算法的生成很值得看看,在Diablo,halflife等都能见到它的身影,希望对此研究的有用-Fuzzylogic is programmed by VB,simple,but the algorithm of it is deserved to have a look,in Diablo, halflife you,etc. you could its use, so maybe it will what you want
    2022-08-07 07:40:40下载
    积分:1
  • 从与相关的快速中分离
    离散相关和自相关的快速算法-separated from the relevant and related to the fast algorithm
    2023-07-04 00:20:03下载
    积分:1
  • Classification algorithm based on support vector machine, after test results, we...
    基于支持向量机分类算法,经试验效果不错,取得了很好的分类效果-Classification algorithm based on support vector machine, after test results, well, and achieved very good classification results
    2022-03-05 15:28:17下载
    积分:1
  • 生成均匀随机数列实现和生成高斯随即序列的两种实现...
    生成均匀随机数列算法实现和生成高斯随即序列的两种算法实现-uniform random number generation algorithm out and then generate Gaussian sequences of the two Algorithm
    2022-05-06 11:54:11下载
    积分:1
  • err
    对弈程序采用了多种搜索算法.以下是本程序主要的类说明: 1.CEveluation类:估值类,对给定的棋盘进行估值. 2.CMoveGenerator类:走法产生器,对给定的棋盘局面搜索出所有可能的走法. 3.CSearchEngine类:搜索引擎基类. 4.CNegaMaxEngine类:负极大值法搜索引擎. 5.CAlphaBetaEngine类:采用了Alpha-Beta剪枝技术的搜索引擎. 6.CFAlphaBetaEngine类:fail-softalpha-beta搜索引擎. 7.CHistoryHeuristic类:历史启发类. 8.CAlphabeta_HHEngine类:带历史启发的Alpha-Beta搜索引擎. 9.CAspirationSearch类:渴望搜索引擎. 10.CIDAlphabetaEngine类:迭代深化搜索引擎. 11.CMTD_fEngine类:MTD(f)搜索引擎. 12.CTranspositionTable类:置换表. 13.CAlphaBeta_TTEngine类:加置换表的Alpha-Beta搜索引擎. 14.CPVS_Engine类:极小窗口搜索引擎. 15.CNegaScout_TT_HH类:使用了置换表和历史启发的NegaScout搜索引擎. 本程序还具有悔棋,还原功能,还可以记录走法.-err
    2022-03-22 14:50:39下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载