跳到正文

休闲·娱乐

01数字雨

蒟蒻whker约 1 分钟
原文
文章信息与版本

文章信息

发布
2024年10月19日
收录
2025年12月12日
更新
2026年11月16日
篇幅
约 1 分钟

版本

  1. v1当前
C++
#include <stdlib.h>
#include <time.h>
#include <Windows.h>
#include<iostream>
int main() 
{ 
	srand((unsigned)time(NULL)); 
	system("color 02"); 
	while (1)
	{ 
		for(int k = 0; k <= 99; k++) 
		{
			if(rand() % 5 >= 3)
			{
				printf("%-*d", rand() % 3 + 2, k % 2);
			} 
		}
		printf("\n"); 
		Sleep(50);
	}
	return 0;
}
原文