
小游戏
WANGYUZHEN王玉镇
c++,Python,Minecraft Unity 3D
展开
-
反电子教室系统c++(结束电子教室CPU进程)
#include <iostream> #include <windows.h> #include <string> using namespace std; void movexy(short x, short y) { COORD position= {x, y}; HANDLE hOut=GetStdHandle(STD_OUTPUT_HANDLE); SetConsoleCursorPosition(hOut, position); } .原创 2021-08-11 16:54:14 · 926 阅读 · 1 评论 -
猜数字 Python
import tkinter as tk import sys import random import re number = random.randint(0,1024) running = True num = 0 nmaxn = 1024 nminn = 0 def eBtnClose(event): root.destroy() def eBtnGuess(event): global nmaxn global nminn global num global runn原创 2021-05-23 16:41:40 · 127 阅读 · 0 评论 -
Python 猫捉老鼠game
import turtle import time import random def up(): jerry.setheading(90) jerry.forward(20) def down(): jerry.setheading(270) jerry.forward(20) def left(): jerry.setheading(180) jerry.forward(20) def right(): jerry.setheading(0)转载 2021-05-23 16:38:25 · 348 阅读 · 1 评论 -
回文数c++
回文数: #include <cstdio> int main() { int s=0; for(int i=100;i<1000;i++) {int a,b,c; b=i/10%10; c=i%10; if(i%10==i/100) { printf("回文数:%d;\n",i); s++; } } printf("三位回文数总共 %d 个。\n",s); return 0; } 试验代码 c++:ht...原创 2021-05-23 13:19:55 · 1776 阅读 · 0 评论 -
斐波那契数列
斐波那契数列: #include <math.h> #include <stdio.h> #include <assert.h> typedef unsigned long long int uint64; uint64 fib(int n) { double r; const double q5 = sqrt(5.0); assert(n <= 93); // 93项后超过uint64 r = po原创 2021-05-16 18:31:49 · 155 阅读 · 0 评论 -
简易倒计时
#include<iostream> using namespace std; #include<ctime> class Clock{ int h; int m; int s; public: void set(int hour,int min,int sec);//set(int ,int ,int ) void tick(); void show(); void run(); }; void Clock::set(int hour,int min,int se..原创 2021-04-24 11:54:54 · 125 阅读 · 0 评论 -
简易贪吃蛇 C++
#include<stdio.h> #include<conio.h> #include<windows.h> #include<time.h> #define framex 5 #define framey 5 #define wide 20 #define high 20 int i,j,a[2]; //将光标移动到指定位置 void gotoxy(HANDLE hout,int x,int y){ //COORD是WindowsAPI中定义..原创 2021-04-24 11:18:22 · 372 阅读 · 0 评论