C_CPP/01_ENV/func1.c

27 lines
514 B
C

#include <stdio.h>
#include <math.h>
#define func1
int func3(int x) {
return pow(x, 3) - 3 * pow(x, 2) - x + 3;
}
int func2(int x) {
return pow(x, 4) - 5 * pow(x, 3) + pow(x, 2) + 5;
}
int recurse1(int count) {
if(count >= 0) {
printf("Recurse 1: %d", func3(count - 1));
return recurse1(count - 1);
}else return 0;
}
int recurse2(int count) {
if(count >= 0) {
printf("Recurse 2: %d", func3(count - 1));
return recurse1(count - 1);
}else return 0;
}