fork(2) download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. double funktion(double);
  5. double funcshn(double);
  6.  
  7. int main(){
  8. int i = 0;
  9. double x = 0;
  10. for (i = 0; i < 10; i++){
  11. x = x + funktion(x);
  12. }
  13. cout << x;
  14. }
  15.  
  16. double funcshn(double *y){
  17. return (*y)+10;
  18. }
  19.  
  20. double funktion(double x){
  21. double y = 10;
  22. return x + funcshn(&y);
  23. }
Success #stdin #stdout 0s 3468KB
stdin
Standard input is empty
stdout
20460