Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <windows.h>
- #include <stdlib.h>
- using std::cout;
- using std::cin;
- using std::endl;
- #define AlphabetSIZE 36
- #define White 15
- #define Green 2
- #define SymbolsSIZE 8
- char Alphabet[] = {'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','0','1','2','3','4','5','6','7','8','9'};
- char Symbol[] = {'!','@','#','$','%','&','=','+'};
- int main()
- {
- short int c;
- short int f;
- char input;
- short int counter = 0;
- SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),Green);
- while(1)
- {
- for(int i=0; i<AlphabetSIZE;i++)
- {
- c = rand() % AlphabetSIZE;
- f = rand() % SymbolsSIZE;
- cout << Alphabet[c];
- if(counter %20 == 0)
- {
- SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),White);
- cout << Symbol[f];
- }
- SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),Green);
- counter = counter + 1;
- }
- cout << "\n";
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement