[求助]简单的程序怎么会发生编译错误呢?
max(int a,int b,int c){
if (a>b)
{if(a>c) return a;
else return c;
}
else
{if(b>c) return b;
else return c;
}
}
不明白了,发生编译错误,没办法...哥们,这段代码有什么问题呀?
谢谢提示~~~~~~~~~~~!
#include <iostream.h>
int max(int a,int b,int c)
{
if (a>b)
{if(a>c) return a;
else return c;
}
else
{if(b>c) return b;
else return c;
}
}
void main()
{
int a=2,b=3,c=4;
cout<<max(a,b,c)<<endl;
}