開發平台(Platform): ubuntu codeblock
問題(Question):每到一定的count,
execfunction1() 會把 execfunction2()和execfunction3()產生的值丟出去
code中是每100筆丟過去一次,但是假如我要連 count%till_times 也就是
最後餘數的那些值也要傳過去,ex:總共304筆 每100筆丟過去遇到那剩下
4筆就丟不過去,應該怎樣改會比較洽當
程式碼(Code):
for (i = 0; i < array.size(); i++) {
for (j = 0; j < array2.size(); j++) {
till_times = 100;
if (count > till_times || count = 0) {
count = 0;
execfunction1();
}
if (count <= till_times) {
if (count < till_Times) {
execfuction2();
} else {
execfuction3();
}
count++
}
}
}