Advertisement
tobast

Untitled

Oct 20th, 2012
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.37 KB | None | 0 0
  1. #include <cstdlib>
  2. #include <ctime>
  3. #include <iostream>
  4. using namespace std;
  5.  
  6. const int NB_PINS=100*1000, SIZE_PIN=1000;
  7.  
  8. int main(void)
  9. {
  10.     srand(time(NULL));
  11.  
  12.     cout << NB_PINS << " " << SIZE_PIN << "\n";
  13.     for(int pin=0; pin<NB_PINS; pin++)
  14.     {
  15.         for(int elem=0; elem<SIZE_PIN; elem++)
  16.             cout << ((rand()%10 == 0) ? 'o' : ' ');
  17.         cout << "\n";
  18.     }
  19.     return 0;
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement