How can i make the overHalfSum integer add up with every for loop ? Note that the compiler warns me that overHalfSum is not used.
int overHalfSum=0;
for (int i=0;i<20;i++){
if (sensorPol[i].getCo()>0.5){
overHalfSum += 1;
}
}
for (int i=0;i<20;i++){
if (sensorTemp[i].getMax()>0.5){
overHalfSum += 1;
}
}
for (int i=0;i<10;i++){
if (camera[i].getLoad()>0.5){
overHalfSum += 1;
}