fork download
  1. #include <stdio.h>
  2. #include <time.h>
  3.  
  4. int main(void)
  5. {
  6. srand( time(NULL) );
  7. for( int i = 0; i < 3; i++ )
  8. {
  9. printf( "Anon%d: obj1 = %d; obj2 = %d; obj3 = %d\n", i, rand()%4+2, rand()%4+2, rand()%4+2 );
  10. }
  11. return 0;
  12. }
  13.  
Success #stdin #stdout 0s 2112KB
stdin
Standard input is empty
stdout
Anon0: obj1 = 2; obj2 = 5; obj3 = 4
Anon1: obj1 = 5; obj2 = 5; obj3 = 5
Anon2: obj1 = 2; obj2 = 2; obj3 = 3