fork download
  1. #include <iostream>
  2. #include <cstdlib>
  3. #include <ctime>
  4.  
  5. using namespace std;
  6.  
  7. void game()
  8. {
  9. cout<<"test ";
  10. int i1 = rand() % 101;
  11. int i2 = rand() % 101;
  12. while(i2 == i1)
  13. i2 = rand() % 101;
  14. cout<<i1<<" "<<i2<<'\n';
  15. }
  16.  
  17.  
  18. int main()
  19. {
  20. srand(time(nullptr));
  21. for(int i = 0; i < 100; ++i)
  22. game();
  23. }
  24.  
Success #stdin #stdout 0s 3296KB
stdin
Standard input is empty
stdout
test 5  31
test 93  74
test 1  30
test 98  38
test 49  87
test 96  94
test 87  30
test 38  80
test 90  29
test 30  4
test 49  80
test 65  21
test 5  91
test 71  32
test 97  55
test 3  27
test 13  77
test 29  14
test 74  93
test 53  22
test 46  14
test 83  32
test 44  87
test 11  100
test 15  41
test 3  64
test 87  34
test 85  59
test 24  21
test 57  20
test 42  61
test 14  56
test 3  9
test 36  77
test 1  89
test 66  13
test 69  48
test 45  12
test 34  23
test 11  15
test 30  82
test 79  17
test 82  30
test 42  6
test 51  99
test 93  94
test 25  73
test 15  29
test 82  51
test 72  50
test 6  3
test 63  75
test 51  8
test 88  51
test 98  65
test 32  27
test 46  11
test 10  28
test 7  52
test 0  58
test 17  59
test 17  42
test 32  99
test 37  13
test 50  9
test 29  56
test 12  93
test 30  67
test 84  47
test 64  49
test 80  57
test 61  57
test 68  55
test 64  19
test 21  88
test 2  81
test 72  11
test 12  70
test 48  92
test 86  23
test 21  7
test 2  80
test 4  99
test 46  88
test 45  76
test 2  91
test 32  30
test 13  100
test 85  43
test 86  73
test 98  88
test 53  69
test 65  31
test 4  13
test 89  57
test 2  76
test 30  4
test 55  34
test 2  67
test 89  14