哪位大佬帮我看看哪里错了,谢谢
#include <stdio.h>
int people(n)
{
int age;
if(n==1)
return 10;
else
age=people(n-1)+2;
return age;
}
int main()
{
int people(5);
printf("第5个人的年龄是%d岁", people(5));
return 0;
}
#include <stdio.h>
int people(n)
{
int age;
if(n==1)
return 10;
else
age=people(n-1)+2;
return age;
}
int main()
{
int people(5);
printf("第5个人的年龄是%d岁", people(5));
return 0;
}
2019-09-05
举报