fork(2) download
  1. #include <iostream>
  2. #include <cmath>
  3. using namespace std;
  4.  
  5. double c3(double x)
  6. {
  7. if (x >= 0) return pow(x,1./3.);
  8. else return -pow(-x,1./3.);
  9. }
  10.  
  11.  
  12. int main() {
  13. cout << c3(-9);
  14. }
Success #stdin #stdout 0.01s 5592KB
stdin
Standard input is empty
stdout
-2.08008