fork(4) download
  1. #include <iostream>
  2. #include <ctime>
  3. #include <cstdlib>
  4.  
  5. using namespace std;
  6.  
  7. int main()
  8. {
  9. srand( time(NULL) );
  10. for (int i = 0; i < 10; ++i)
  11. {
  12. double r = (68.556*rand()/RAND_MAX - 32.768);
  13. cout << r << endl;
  14. }
  15. return 0;
  16. }
Success #stdin #stdout 0s 2896KB
stdin
Standard input is empty
stdout
19.2166
9.05776
20.7815
10.93
-29.4271
-17.065
-3.15067
-16.526
-15.0967
-31.3929