bgen.cpp 507 B

12345678910111213141516171819202122
  1. /*
  2. * Outputs random 100-digits binary string mostly containing 0's.
  3. * In average it contrains only 10% of 1's.
  4. *
  5. * To generate different values, call "bgen.exe" with different parameters.
  6. *
  7. * It is typical behaviour of testlib generator to setup randseed by command line.
  8. */
  9. #include "testlib.h"
  10. #include <iostream>
  11. using namespace std;
  12. int main(int argc, char* argv[])
  13. {
  14. registerGen(argc, argv, 1);
  15. cout << rnd.next("[0000000001]{100}") << endl;
  16. return 0;
  17. }