All pastes #436368 Raw Edit

Something

public text v1 · immutable
·published 2007-04-12 13:47 UTC
rendered paste body
#include <stdio.h>

int main(int argc, char **argv)
{
	// Valid Characters For Matrix Code
	char valid_matrix_code[21] = "0x!£$%^&*(){}@~#?/<>";
	int valid_matrix_colour[3] = {0, 2};

	// Matrix Code Loop ...
	int i, j = 0;
	for(i = 0; i < 25600; i++)
	{
		// Each Line ...
		printf("%10s", "");
		for(j = 0; j < 60; j++)
		{
			// Randomise
			int randcode = rand() % 19;
			int randcol = rand() % 2;
			int randbold = rand() % 2;

			// Silly, Failsafe
			if(randcol == 0)
				randbold = 0;

			// Print Colour & Char
			printf("\033[%d;3%dm%c ", randbold, valid_matrix_colour[randcol], valid_matrix_code[randcode]);
		}
		printf("\n");
		continue;
	}
	printf("\033[37m\n\n");

	return 0;
}