使用VC++6.0打开考生文件夹下的源程序文件1.cpp,该程序运行时有错,请改正其中的错误,使程序正常运行,并使程序输出的结果为 Max is 7 提示:max函数川于找出两个数中的最大值,并作为函数值返回。 注意:错误的语句在//******error******的下而,修改该语句即可。 试题程序: #include<iostream> using namespace std; //******error****** int max(int a,int b)
if(a<b)
int t=a; a=b; b=t;
return b;
int main()
int m=-3; int n=7; //******error****** max(-3,n); cout<<"Max is"<<m<<end1; return 0;