fork(4) download
  1. #include <iostream>
  2. #include <vector>
  3. #include <numeric>
  4. using namespace std;
  5. int main()
  6. {
  7.  
  8. vector<double> coordinates;
  9. coordinates.push_back(0.5);
  10. coordinates.push_back(0.5);
  11. coordinates.push_back(0.5);
  12.  
  13. cout<<inner_product(coordinates.begin(), coordinates.end(), coordinates.begin(), 0.0)<<endl;
  14.  
  15. return 0;
  16. }
Success #stdin #stdout 0.01s 2856KB
stdin
Standard input is empty
stdout
0.75