Guest User

Untitled

a guest
Jan 19th, 2019
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. #include <iostream>
  2. #include <string.h>
  3. #include <stdio.h>
  4.  
  5. using namespace std;
  6. int m;
  7. char str[80];
  8.  
  9. int rekfunk(int i)
  10. { int val;
  11.  
  12. if(i<1)
  13. {
  14. cout << str <<"i hat den wert 0, Funktion returned 0" << endl;
  15. return 0;
  16. }
  17. cout << str << (i-(m+1))*-1 << ". Funktionsaufruf" << endl;
  18. cout << str << "i hat hier den Wert: " << i << endl;
  19. cout << str << "|" << endl;
  20. cout << str << "|" << endl;
  21. cout << str << "-----------" << endl;
  22. strcat (str,"\t");
  23. val = 7+ rekfunk(i-1);
  24. cout << str << "Return von " << (i-(m+1))*-1 << ". Funktionsaufruf(" << val << ")" << endl<< endl;
  25.  
  26.  
  27. return val;
  28. }
  29. void main()
  30. {
  31. strcpy (str,"");
  32. m= 3;
  33. cout << rekfunk(3) << endl;
  34. system("PAUSE");
  35. }
Add Comment
Please, Sign In to add comment