第七行报错,大神帮忙看看
int getage(n)
{
int num;
if(num == 1)
{
return 10;
}
else
{
num =getage(n-1)+2;
}
return num;
}
int main()
{
int fifthage =getage(5);
printf("第5个人的年龄是%d岁", fifthage);
return 0;
}