为什么不用声明呢?
#include <iostream.h>#include<math.h>
double max(double x,double y)
{
if(x>y)
return y;
else
return x;
}
void main()
{
double a,b,c;
cout<<"input tow numbers"<<endl;
cin>>a>>b;
c=max(a,b);
cout<<"the squar root of c is"<<""<<sqrt(c)<<endl;
}
//我的问题是为什么不在main下面大括号的下一行加上double max(double x,double y);来表示声明呢?