哪错了啊啊
#include <stdio.h>
int getAge(n)
{
int age(n)
if(n==1)
age=10;
else
age = getAge(n-1)+2;
return age;
}
int main()
{
int fifthAge=getAge(5)
printf("第5个人的年龄是%d岁", fifthAge);
return 0;
}
#include <stdio.h>
int getAge(n)
{
int age(n)
if(n==1)
age=10;
else
age = getAge(n-1)+2;
return age;
}
int main()
{
int fifthAge=getAge(5)
printf("第5个人的年龄是%d岁", fifthAge);
return 0;
}
2022-10-13
举报