#include<stdio.h>
#include<math.h>
int main(void){
double a=0,r=0,n=0;
printf("Enter Constant a:");
scanf("%lf",&a);
printf("Enter Constant r:");
scanf("%lf",&r);
printf("Enter Variable n:");
scanf("%lf",&n);
double an;
an = geom_rec(a,r,n); // Line 15
return 0;
}
double geom_rec(double a,double r,double n){ // Line 20
double ans=a;
return a;
}
Line 20: error: conflicting types for 'geom_rec'
Line 15: error: previous implicit declaration of 'geom_rec' was here
+1值得說明默認'int'返回類型。 – hmjd 2012-04-18 15:14:26
:P thx,即時通訊只是在我的課堂上學習,我有時會忘記這些事情。 THX如此! – user1082764 2012-04-18 15:15:32
哎喲,那個答案的分數讓我意識到它實際上讓我的零代表增加:p – ThiefMaster 2012-04-18 15:17:46