c語言流星雨
浪漫表白效果:
開發環境:Visual Studio 2019 + EasyX圖形庫插件即可
源碼展示:
以上就是我們表白程序的源碼了!最後祝大家都能和喜歡的人在一起哦~
我的C/C++編程學習基地,點擊正在跳轉「鏈接」即可加入,歡迎有問題的小夥伴一起進來學習交流嗷~
⑵ 用C語言編寫流星雨程序
數字流星雨代碼:
//流星雨.cpp:Defines the entry point for the console application.
//
///////////////////////////////////////////////////
//程序名稱:數字流星雨
//最後修改:2006-10-15
///////////////////////////////////////////////////
#include<windows.h>
#include<time.h>
#include<stdlib.h>
#include"graphics.h"
#include<conio.h>
#include<math.h>
/***********************宏定義**********************/
#define PI 3.1415926//圓周率
#define WIDTH 200//屏幕寬度,流星出生區域
#define HEIGHT 150//屏幕高度,流星出生區域
#define V 20//流星速度,單次移動的像素數
#define LENGTH 20//流星字元數
#define DELAY 30//延時
#define NUM 45//流星個數
/******************定義流星結構體*******************/
struct meteor
{
int x0;
int y0;
int yh;
char str[LENGTH];
}me[NUM]={0};
/*********************函數聲明**********************/
char AsciiRand();
void Move(char*p);
void InitMeteor(struct meteor*me);
int color(int y,int y0,int yh);
void Meteors(struct meteor me[]);
/***********************主函數**********************/
///int main(void)
int _tmain(int argc,_TCHAR*argv[]){
char c='