因為我的A和B是變數, 不能直接用那公式.......
OHYAOH 發表於 11-6-21 09:50 PM 
應該說大大的A, B & C是"陣列"變數,
condition in IF, WHILE, FOR statements has to be Numeric or Boolean type.
You can not use array here, please use [] (array subscript operator) to access array elements
以上是講述在IF, WHILE, FOR 判斷式需使用數字或布林格式做判斷,不能用"陣列"~~
所以後面大大,if ( A[ i ] > B[ i ] ) 是可以用的~~
A[ i ] or B[ i ] 是傳回一個值而非一個陣列~~
但...Buy = A > B 卻可以用喔!! |