我必须使用递归函数来评估此分数,其中" n"是分数的计数
但我得到了这个错误:"隐含的功能声明"和#34;冲突类型"
#include <stdlib.h>
#include <stdio.h>
int main(void) {
printf("Enter size of n\n");
int n;
scanf ("%d", &n);
float result = 2 / recursion(n); //implicit declaration of function
printf("Result of dividing is = %f", result);
return 0;
}
float recursion(int n) { //conflicting types
float res = 2 + recursion(n - 1);
return res;
}
帮助我找出它的错误