fork download
  1. #include <iostream>
  2. #include <sstream>
  3. using namespace std;
  4. #include <random>
  5.  
  6. std::mt19937 generator;
  7. std::uniform_real_distribution<double> distribution(0,1000000.000000000000000);
  8.  
  9.  
  10. int main() {
  11. double a = 0., b = 0., c = 0.;
  12. int l =0;
  13. while(l!= 100){
  14. l++;
  15. a = distribution(generator);
  16. b = distribution(generator);
  17. c = distribution(generator);
  18. //cout<<a<<" "<<b<<" "<<c<<endl;
  19. if (( ( (a + b ) + c ) == ( a + ( b + c ) ) ) == 0){
  20. cout <<std::scientific<<a<<" "<<b <<" "<<c<<endl ;
  21. l++;
  22. }
  23.  
  24. }
  25. return 0;
  26. }
  27.  
  28.  
Success #stdin #stdout 0s 3296KB
stdin
Standard input is empty
stdout
1.580576e+05 7.617312e+05 2.301561e+05
9.817231e+05 8.234554e+05 3.018273e+05
3.553487e+05 7.199709e+05 6.544506e+04