#include<stdio.h>
#include<stdlib.h>
#include<time.h>
#define N 52
void XiPai(int (*q)[13],int n)
{
int (*s)[13];
s=q;
int temp,p1,p2,p3,p4;
srand( (unsigned)time( NULL ) );
int cnt=rand()%1000;
while(cnt--)
{
p1=rand()%3;
p2=rand()%12;
p3=rand()%3;
p4=rand()%12;
temp=*(*(q+p1)+p2);
*(*(q+p1)+p2)=*(*(q+p3)+p4);
*(*(q+p3)+p4)=temp;
}
printf("洗完牌后的牌序是:\n");
int i=0;
for(;i<n;i++)
{
if(i%13==0)
{
printf("\n");
}
本内容试读结束,登录后可阅读更多
下载后可阅读完整内容,剩余2页未读,立即下载