回复 20楼 暗迷
程序代码:
# include <stdio.h> int Age(int n); int main (void) { printf("第5个人的年龄是:%d\n",Age(5)); return 0; } int Age(int n) { int age; if(n==1) age = 10; else age = 2+Age(n-1); return age; }
你醒了?快起来敲代码!!
# include <stdio.h> int Age(int n); int main (void) { printf("第5个人的年龄是:%d\n",Age(5)); return 0; } int Age(int n) { int age; if(n==1) age = 10; else age = 2+Age(n-1); return age; }