把max函数提到main函数外面,函数里不能定义函数
要学会看报错提示, 下面说了“a function-defination is not allowed here before "{" token”,就是说你不该在第六行(main函数内)定义的函数
方法写在main函数外面,