自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(9)
  • 收藏
  • 关注

原创 第一道题目

设计一个猜数字游戏,即系统随机出一个0-100的整数,用户输入数字,提示输出大还是小,超过4次则为用户失败,游戏结束后询问用户是否下一轮。

2022-06-22 22:37:19 603 1

原创 51单片机独立按键控制LED移位

独立按键控制LED移位

2022-06-14 10:15:03 263

原创 【无标题】飞机游戏

飞机游戏

2022-06-07 18:41:20 325

原创 杨辉三角

#include<stdio.h>#define N 11int main(){ int i,j,y[N][N]; for(i=1;i<N;i++) { y[i][1]=y[i][i]=1; for(j=2;j<=i-1;j++) y[i][j]=y[i-1][j]+y[i-1][j-1]; } for(i=1;i<N;i++) { for(j=1;j<=i;j++).

2022-04-03 00:19:22 201

原创 贪吃蛇完整版

#include<stdio.h>#include<stdlib.h>#include<conio.h>#include<windows.h>#define High 20#define Width 30int moveDirection;int food_x,food_y;int canvas[High][Width]={0}void gotoxy(int x,int y){ HANDLE handle=GetStdHandl.

2022-03-20 23:24:36 40

原创 贪吃蛇--判断游戏失败

void moveSnakeByDirection(){ int i,j; for(i=1;i<High-1;i++) for(j=1;j<Width-1;j++) if(canvas[i][j]>0) canvas[i][j]++; int oldTail_i,oldTail_j,oldHead_i,oldHead_j; int max=0; for(i=1;i<High-1;i++) for(j=1;j&.

2022-03-20 23:22:25 65

原创 玩家控制小蛇移动

void updateWithInput(){ char input; if(kbhit()) { input=getch(); if(input=='a') { moveDirection=3; moveSnakeByDirection(); } else if(input=='d') { moveDirection=4; moveSnakeByDirection(); } else if(input=='w') { moveDi.

2022-03-20 12:38:47 111

原创 小蛇的移动

#include<stdio.h>#include<stdlib.h>#include<conio.h>#include<windows.h>#define High 20#define Width 30int moveDirection;int canvas[High][Width]={0};void gotoxy(int x,int y){ HANDLE handle=GetStdHandle(STD_OUTPUT_HANDLE.

2022-03-20 11:55:00 69

原创 贪吃蛇--构造小蛇

# include <stdio.h># include <stdlib.h># include <conio.h># include <windows.h> # define High 20 //游戏画面尺寸# define Width 30 //全局变量int canvas[High][Width] = {0}; .

2022-03-19 21:32:15 48

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除