类似代码雨的一个程序
蒟蒻拿来献丑了
#include <graphics.h>
#include <time.h>
#include <conio.h>int main()
{srand((unsigned)time(NULL));initgraph(640, 480);int x, y;char s[3] = { 0 };while (!_kbhit()){for (int i = 0; i < 479; i++){setcolor(RGB(255,0,255));for (int j = 0; j < 3; j++){x = (rand() % 80) * 8;y = (rand() % 20) * 24;s[0] = (rand() % 26) + 65;outtextxy(x, y, s);}setcolor(0);line(0, i, 639, i);Sleep(50);if (_kbhit()) break;}}closegraph();
}
紫色也挺好看的,哈哈