Advertisement
LightProgrammer000

Matrix [Effect]

Nov 29th, 2018
220
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.25 KB | None | 0 0
  1. /// Bibliotecas
  2. #include <time.h>
  3. #include <string>
  4. #include <iostream>
  5. #include <locale.h>
  6. #include <windows.h>
  7. using namespace std;
  8.  
  9. /// Programa
  10. int main ( int argc , char *argv[] )
  11. {
  12.     // Variáveis
  13.     int r;
  14.  
  15.     // Tamanho: 60
  16.     char a[] = { 'a', 'b','c','d','e','f','g','h','i','j','k','l',
  17.                  'm','n','o','p','q','r','s','t','u','v','x','z',
  18.                  '1','2','3','4','5','6','7','8','9','0','!','@',
  19.                  '#','$','%','¨','&','*','(',')','-','_','+','=',
  20.                  '§','/','£','¢','¬','?','\\','[',']','^', '`','´'
  21.                 };
  22.  
  23.     // Sistemas
  24.     setlocale(LC_ALL, "");
  25.     srand( (unsigned) (time(NULL) ) );
  26.     system("cls & color A");
  27.  
  28.     // Apresentação
  29.     cout << " ========================== " << endl;
  30.     system("echo  - Usuario: %username%");
  31.     system("echo  - Computador: %computername%");
  32.     system("echo  - Hora: %time:~0,-3%");
  33.     system("echo  - Data: %date:/=-%");
  34.     cout << " ========================== \n" << endl;
  35.  
  36.     for ( ; ; )
  37.     {
  38.         r = ( rand() % sizeof(a) );
  39.  
  40.         cout << " 1 " << a[r];
  41.         cout << " 0 " << a[r];
  42.         cout << " 1 " << a[r];
  43.         cout << " 0 " << a[r];
  44.         Sleep(3);
  45.     }
  46.     return(0);
  47. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement