我这是怎么了
#include <stdio.h>
int numPeople(n)
{
int age;
if(n==1)
{
age=10;
}
else
{
age=(n-1)+2;
}
return age;
}
int main()
{
int age=numPeople(5);
printf("第5个人的年龄是%d岁", age);
return 0;
}
#include <stdio.h>
int numPeople(n)
{
int age;
if(n==1)
{
age=10;
}
else
{
age=(n-1)+2;
}
return age;
}
int main()
{
int age=numPeople(5);
printf("第5个人的年龄是%d岁", age);
return 0;
}
2018-10-16
举报