//To show the falling characters in a matrix
#include <cstdlib>
#include <iostream>
#include <windows.h>
#include <conio.h>
#include <stdio.h>
using namespace std;
int main(int argc, char *argv[])
{
int a;
string array[105]={"A","B","C","D"," ","E","F","G"," ","H","I","J","K","L","M"," ","N","O","P","Q","R","S"," ","T","U","V","W","X","Y"," ","Z","1","2","3"," ","4","7"," ","9","0","~"," ","@","#","$","^","$"," "," "," "," ", " ", "*",":",";","?","|","#","#","$","$","$","$","?","?","?","?","@","@","0","0","0","0","0","0","0","0","0","1","1","1","1","1","1","0","0","0","0","0","1","1","1","1"};
system("TITLE The Matrix");
system("color 0A");
while(1)
{
Sleep(25);
for(int i=0; i < 26; i++)
{
a = rand()%90;
cout << "" << array [a];
cout << " ";
}
cout << endl;
}
system("PAUSE");
return 0;
}
Great code it wont let me run it, but when I trace it looks like you did a good job
ReplyDeletethanks for your feedback @anonymous
ReplyDelete