mirror of
https://github.com/Kaehvaman/OAIP.git
synced 2025-02-22 22:46:21 +04:00
finished lab17
This commit is contained in:
parent
ea2ea95c2c
commit
3524144e51
@ -94,6 +94,14 @@ void G3(int n, FILE* f) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void f9(int n) {
|
||||||
|
printf_s("<%d*", n);
|
||||||
|
if (n > 1) {
|
||||||
|
f9(n - 1);
|
||||||
|
}
|
||||||
|
printf_s("%d*>", n);
|
||||||
|
}
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
FILE* fout = fopen("trace.txt", "w");
|
FILE* fout = fopen("trace.txt", "w");
|
||||||
if (fout == NULL) {
|
if (fout == NULL) {
|
||||||
@ -136,6 +144,11 @@ int main() {
|
|||||||
F3(11, fout);
|
F3(11, fout);
|
||||||
fprintf(fout, "F3(%d) returned\n", 11);
|
fprintf(fout, "F3(%d) returned\n", 11);
|
||||||
|
|
||||||
|
printf_s("\n\n");
|
||||||
|
f9(5);
|
||||||
|
|
||||||
|
printf_s("\n\n");
|
||||||
|
|
||||||
fclose(fout);
|
fclose(fout);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user