@[qimingzihaomafan](/space/show?uid=193859)
数组越界
by 准点的星辰 @ 2019-04-01 21:11:26
![](https://s2.ax1x.com/2019/04/01/AyV8p9.png)
by 准点的星辰 @ 2019-04-01 21:13:30
@[准点的星辰](/space/show?uid=54502)
大佬,我还是有点不明白。
输入函数前把a,b,c都改到20以内了,为什么还会越界?大佬您送佛送到西,再帮弱鸡一把吧。
by qimingzihaomafan @ 2019-04-02 12:47:51
@[qimingzihaomafan](/space/show?uid=193859)
有负数啊
by 准点的星辰 @ 2019-04-02 17:59:26
@[准点的星辰](/space/show?uid=54502)
可是我也加了特判哇
```
if (a <= 0 || b <= 0 || c <= 0) //小于零直接结束
return 1;
```
by qimingzihaomafan @ 2019-04-02 22:26:55