这个这样写不对
#include<stdio.h>
int getAge(numPeople)
{
int age;//定义年龄
if(numPeople==1)
age=10;
else
age=age+(numPeople-1)*2
return age;
}
int main()
{
int fifthAge=getAge(5);
printf("第五个人的年龄是%d岁",fifthAge);
return 0;
}
#include<stdio.h>
int getAge(numPeople)
{
int age;//定义年龄
if(numPeople==1)
age=10;
else
age=age+(numPeople-1)*2
return age;
}
int main()
{
int fifthAge=getAge(5);
printf("第五个人的年龄是%d岁",fifthAge);
return 0;
}
2017-09-21
举报