
# include
using namespace std;
double fun(int n,double h)
{
if(n==1)
return h;
else if(n<=4)
{
h=2*h+0.2;
n--;
return fun(n,h);//搞了半天,解释银携凳隐敬:.当n=1时返回值在此行,需要返回给main函数
}
else
{cout<<"Input error!";exit(1);}
}
int main()
{
double h;
h=fun(2,3);
cout<<锋旅"The initial height is :\n"<