Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <string.h>
- #include <stdio.h>
- using namespace std;
- int m;
- char str[80];
- int rekfunk(int i)
- { int val;
- if(i<1)
- {
- cout << str <<"i hat den wert 0, Funktion returned 0" << endl;
- return 0;
- }
- cout << str << (i-(m+1))*-1 << ". Funktionsaufruf" << endl;
- cout << str << "i hat hier den Wert: " << i << endl;
- cout << str << "|" << endl;
- cout << str << "|" << endl;
- cout << str << "-----------" << endl;
- strcat (str,"\t");
- val = 7+ rekfunk(i-1);
- cout << str << "Return von " << (i-(m+1))*-1 << ". Funktionsaufruf(" << val << ")" << endl<< endl;
- return val;
- }
- void main()
- {
- strcpy (str,"");
- m= 3;
- cout << rekfunk(3) << endl;
- system("PAUSE");
- }
Add Comment
Please, Sign In to add comment