当前位置: 首页 > news >正文

备案号如何绑定多个网站seo资源是什么意思

备案号如何绑定多个网站,seo资源是什么意思,视频剪辑找什么公司,域名服务网站按照教程打完了。好几个bug都是自己打出来的。比如统计周围8个格子时,有一个各自加号填成了减号。我还以为平移了,一会显示是0一会显示是2。结果单纯的打错了。debug的时候断点放在scanf后面会顺畅一些。中间多放一些变量名方便监视。以及mine要多显示&a…

按照教程打完了。好几个bug都是自己打出来的。比如统计周围8个格子时,有一个各自加号填成了减号。我还以为平移了,一会显示是0一会显示是2。结果单纯的打错了。debug的时候断点放在scanf后面会顺畅一些。中间多放一些变量名方便监视。以及mine要多显示,在测试的时候。虽然成品是show,但是拿成品测试累死个人

test.c

#define _CRT_SECURE_NO_WARNINGS#include "game.h"void menu()
{printf("------------------------------------\n");	printf("----------  1.play  ----------------\n");printf("----------  2.exit  ----------------\n");printf("------------------------------------\n");printf("------------------------------------\n");//记得换行符
}void game()
{//存放布置的雷char mine[ROWS][COLS] = { 0 };//存放排查出的雷char show[ROWS][COLS] = { 0 };Initboard(mine, ROWS, COLS, '0');Initboard(show, ROWS, COLS, '*');setmine(mine, ROW, COL);Displayboard(show, ROW, COL);findmine(mine, show, ROW, COL);/*Displayboard(mine, ROW, COL);Displayboard(show, ROW, COL);*/}int main()
{//初始化int input= 0;srand((unsigned int)time(NULL));//生成随机数的最简步骤有哪些?do{menu();printf("请选择:>");scanf("%d", &input);switch(input){case 1:game();//printf("扫雷\n");break;case 2:printf("退出游戏\n");break;default:printf("错误选择\n");break;}} while (input == 2 ? 0 : input);return 0;
}

game.c

#define _CRT_SECURE_NO_WARNINGS
#include "game.h"void Initboard(char board[ROWS][COLS], int rows, int cols, char set)
{int i, j;for (i = 0; i < rows; i++){for (j = 0; j < cols; j++){board[i][j] = set;}}
}void Displayboard(char board[ROWS][COLS], int row, int col)
{int i = 0;int j = 0;printf("----------  扫雷游戏  -----------\n");//记得换行符for (j = 0; j <= col; j++){printf("%d ", j);}printf("\n");for (i = 1; i <= row; i++){printf("%d ", i);for (j = 1; j <= col; j++){printf("%c ", board[i][j]);}printf("\n");}printf("----------  扫雷游戏  -----------\n");//记得换行符
}void setmine(char board[ROWS][COLS], int row, int col)
{int count = EASY_COUNT;while (count){int x = rand() % row + 1;int y = rand() % col + 1;if (board[x][y] == '0'){board[x][y] = '1';count--;}}
}int get_mine_count(char board[ROWS][COLS], int x, int y)
{int i;i=(board[x - 1][y] + board[x - 1][y - 1] + board[x][y - 1] + board[x + 1][y - 1] + board[x + 1][y] + board[x + 1][y + 1] + board[x][y + 1] + board[x - 1][y + 1] - 8 * '0');return i;
}void findmine(char mine[ROWS][COLS], char show[ROWS][COLS], int row, int col)
{int win = 0;while (win<row*col-EASY_COUNT){printf("请输入要排查的坐标:>");int x = 0;int y = 0;scanf("%d %d", &x, &y);if (x >= 1 && x <= row && y >= 1 && y <= col){if (show[x][y] != '*'){printf("排查过了,换一个\n");}else{if (mine[x][y] == '1'){printf("你被炸死了\n");Displayboard(mine, ROW, COL);break;}else{win++;//周围几个雷int count = get_mine_count(mine, x, y);show[x][y] = count + '0';//转换为数字字符//Displayboard(mine, ROW, COL);Displayboard(show, ROW, COL);}}}else{printf("请重新输入坐标\n");}}//注意这里条件不要写成赋值了if (win == row * col - EASY_COUNT){printf("排雷成功\n");Displayboard(mine, ROW, COL);}}

game.h

#pragma once
#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
#include<time.h>
#include<stdlib.h>
//这几个头文件对应的英文意思和内容是什么#define EASY_COUNT 10#define ROW 9
#define COL 9#define ROWS ROW+2
#define COLS COL+2void Initboard(char board[ROWS][COLS], int rows, int cols, char set);
void Displayboard(char board[ROWS][COLS], int row, int col);
void setmine(char board[ROWS][COLS], int row, int col);
void findmine(char mine[ROWS][COLS], char show[ROWS][COLS], int row, int col);

输出结果:

------------------------------------
----------  1.play  ----------------
----------  2.exit  ----------------
------------------------------------
------------------------------------
请选择:>1
----------  扫雷游戏  -----------
0 1 2 3 4 5 6 7 8 9
1 * * * * * * * * *
2 * * * * * * * * *
3 * * * * * * * * *
4 * * * * * * * * *
5 * * * * * * * * *
6 * * * * * * * * *
7 * * * * * * * * *
8 * * * * * * * * *
9 * * * * * * * * *
----------  扫雷游戏  -----------
请输入要排查的坐标:>1 1
----------  扫雷游戏  -----------
0 1 2 3 4 5 6 7 8 9
1 1 * * * * * * * *
2 * * * * * * * * *
3 * * * * * * * * *
4 * * * * * * * * *
5 * * * * * * * * *
6 * * * * * * * * *
7 * * * * * * * * *
8 * * * * * * * * *
9 * * * * * * * * *
----------  扫雷游戏  -----------
请输入要排查的坐标:>1 2
----------  扫雷游戏  -----------
0 1 2 3 4 5 6 7 8 9
1 1 1 * * * * * * *
2 * * * * * * * * *
3 * * * * * * * * *
4 * * * * * * * * *
5 * * * * * * * * *
6 * * * * * * * * *
7 * * * * * * * * *
8 * * * * * * * * *
9 * * * * * * * * *
----------  扫雷游戏  -----------
请输入要排查的坐标:>2 1
你被炸死了
----------  扫雷游戏  -----------
0 1 2 3 4 5 6 7 8 9
1 0 0 0 1 0 0 0 0 0
2 1 0 0 0 0 0 0 0 0
3 0 0 0 0 1 0 0 0 1
4 0 0 0 0 0 0 1 0 0
5 0 0 0 0 0 0 0 0 1
6 0 0 0 0 0 0 0 0 0
7 0 1 0 0 0 0 0 0 0
8 1 0 0 0 0 0 0 0 0
9 0 0 0 0 0 0 0 1 1
----------  扫雷游戏  -----------
------------------------------------
----------  1.play  ----------------
----------  2.exit  ----------------
------------------------------------
------------------------------------
请选择:>2
退出游戏

http://www.tj-hxxt.cn/news/61348.html

相关文章:

  • 北京网站建设模板软文世界官网
  • 网站建设典型发言上google必须翻墙吗
  • 网站建设空间是否续费苏州百度推广排名优化
  • wordpress建什么站营销软文范例大全300
  • 网站如何做播放线路seo单词优化
  • wordpress中获取当前页面urlseo推广公司招商
  • 外贸优化网站制作恶意点击软件
  • 青岛网站制作公司怎么查找关键词排名
  • 深圳网站建设服务商万创网网站推广优化流程
  • 昆山广告设计制作公司北京如何优化搜索引擎
  • 摄影网站做画册seo服务
  • 网站开发项目详细计划书江门百度seo公司
  • 网站附件做外链属于免费的网络营销方式
  • 金华建站价格关键词首页排名代发
  • 全网营销软件沧州seo公司
  • 网站底部备案seo搜索规则
  • 网站开发师职责在百度怎么创建自己的网站
  • 网站营销的优势凡科建站后属于自己的网站吗
  • 网站视频接口 怎么做不需要验证码的广告平台
  • 番禺网站(建设信科网络)谷歌优化排名哪家强
  • 做美容有哪些网站如何自己搭建网站
  • 深圳做网站哪个公司好搜索网站
  • 个人博客网站制作搭建艺术培训学校招生方案
  • 做微网站需要什么地推网app推广平台
  • 做古玩生意哪些网站好腾讯会议价格
  • 免费的网站建设一般多少钱网站建设情况
  • 企业网站网页设计的步骤英文外链seo兼职
  • 怎样做免费网站推广小程序开发费用明细
  • 个人电脑做服务器映射网站游戏推广赚钱
  • 老网站改版做别的杭州seo软件