标签:com 问题 bsp else std 分享 http stdio.h print


#include<stdio.h>
int age(int n)
{
	int x;
	
	if(n==1)
	 x=10;
	else
	 x=age(n-1)+2;
	return x;
}
int main()
{
	int n;
	
	printf("请输入n值:");
	scanf("%d",&n);
	
	printf("第%d个人的年龄为%d\n",n,age(n));
	
}
标签:com 问题 bsp else std 分享 http stdio.h print
原文地址:https://www.cnblogs.com/gs1124/p/9347682.html