Hi everyone my arduino is doing somthing weird

few lines less than what you had. I don't know why people like typing so much when they only have to write it once

while (j<1000000000){
        j++;
       
        if(cond){
          i=i+10;
       }
        else {
          i=i-10; // why -10?
        } 
          analogWrite(batc,i);
          delay(1000);
      }
 
     
     
      break;