Hi, i got bored and decided to make the matrix shower code in C++. However, i don't know how to change text color to green. Can anyone help me? Here is my code so far.
:D Hehe, i made The Matrix function just so that i could have a function call entitled "The Matrix".Code:#include <fstream.h>
#include <stdlib.h>
#include <conio.h>
void TheMatrix()
{
int a = 0, b = 1, counter = 1, randnum1, randnum2;
do
{
randnum1 = rand();
randnum2 = rand();
if(randnum1 > randnum2)
{
cout << a;
}
else
{
cout << b;
}
}while(counter != 2);
}
main()
{
cout << "This is the Matrix" << endl;
getch();
TheMatrix();
return 0;
}