bgen.cpp 459 B

1234567891011121314151617
  1. /*
  2. * Outputs random 100-digits binary string mostly containing 0's.
  3. * In average, it contains 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. using namespace std;
  11. int main(int argc, char *argv[]) {
  12. registerGen(argc, argv, 1);
  13. println(rnd.next("[0000000001]{100}"));
  14. }