C语言版消消乐.docVIP

  • 135
  • 0
  • 约2.3千字
  • 约 3页
  • 2017-06-12 发布于北京
  • 举报
#includewindows.h #include stdlib.h #include time.h void put1(char a[3][3]) //出现游戏初始界面 { int i,j; for(i=1;i=2;i++) { printf(\n\n\t\t\t\t); for(j=1;j=2;j++) { a[i][j]=1; printf(%c ,a[i][j]); } printf(\n); } } void dingyi(char b[3][3]) //定义随机图案位置 { int row1,col1,row2,col2,row3,col3,row4,col4; srand(time(NULL)); int x=rand()%5+14; //随机出图案 row1=rand()%2+1; //定义第一个位置 col1=rand()%2+1; row2=rand()%2+1; //定义第二个位置 col2=rand()%2+1; row3=rand()%2+1; //定义第3个位置 col3=rand()%2+1; row4=rand()%2+1; //定义第4个位置 col4=ran

文档评论(0)

1亿VIP精品文档

相关文档