#include <stdio.h>
int getAge(numPeople)
{
int age;
if (numPeople==1)
age=10;
}
else
age= getAge(numPeople-1)+2;
return age;
int main()
int fifithAge=getAge(5);
printf("第5个人的年龄是%d岁", fifithAge);
return 0;
终止语句要用return语句返回哦!
if语句内少了一个返回值。