Advertisement
Emulation

Untitled

Oct 4th, 2013
150
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.49 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. int Modulus(int iN, int iMod) {
  4.     int iQ = (iN/iMod);
  5.     return iN - (iQ*iMod);
  6. }
  7.  
  8. char GetChar(int iGenerator, char cBase, int iRange) {
  9.     return (cBase + Modulus(iGenerator, iRange));
  10. }
  11.  
  12. int main() {
  13.     int j = 7;
  14.     while(true) {
  15.         int i = 0;
  16.         //output random row of characters
  17.         while(i < 80) {
  18.             std::cout << GetChar(j + i*i, 33, 30);
  19.             ++i;
  20.         }
  21.         j = (j + 31);
  22.         //Delay
  23.         i = 0;
  24.         while(i < 30000)
  25.         {
  26.             GetChar(1, 1, 1);
  27.                 ++i;
  28.         }
  29.     }
  30.     return 0;
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement