C语言递归解决年龄计算问题的代码
下面的资料是关于C语言递归解决年龄计算问题的代码,应该是对各位朋友也有好处。
#include "stdio.h"#include "conio.h"age(n)int n;{ int c; if(n==1) c=10; else c=age(n-1)+2; return(c);}main(){ printf("%d",age(5)); getch();}
声明:本站所有文章资源内容,如无特殊说明或标注,均为采集网络资源。如若本站内容侵犯了原著者的合法权益,可联系本站删除。