万能百科  > 计算机   > 

[填空题] 以下程序是计算学生的年龄。已知第一位最小的学生年龄为10岁,其余学生的年龄一个比一个大2岁,求第5个学生的年龄。 #include <stdio.

2021-07-20   

[填空题] 以下程序是计算学生的年龄。已知第一位最小的学生年龄为10岁,其余学生的年龄一个比一个大2岁,求第5个学生的年龄。

#include <stdio.h>

age(intn)

int c;

if(n==1) c=10;

else c= (10) ;

return(c);

void main()

int n=5;

printf("age:%d", (11) );

正确答案:

2+age(n-1)

词条内容仅供参考,如果您需要解决具体问题
(尤其在法律、医学等领域),建议您咨询相关领域专业人士。

标签