帮忙看看,谢谢!!
以下程序打印出的结果是一个-85899346010的数...为什么会这样呢...程序有哪里有错误吗....特别是 printf("%d",mony1=caculateChareg(n+1));这句,是不是有什么问题????请指教,谢谢!!!
#include<stdio.h>
int caculateChareg(int);
int caculateChareg(int n,int time,int time1)
{
int mony1;
if(time1<=time-3){
time1++;
printf("%d",mony1=caculateChareg(n+1));
}
else
printf("%d",mony1);
}
main()
{
int ca,mony,t1=0,m=2;
scanf("%d",&ca);
if (ca<=3){
mony=2;
printf("%d",mony);
}
else
caculateChareg(m,ca,t1);
}