Flex Sensor Application Thresholding Problem

Hi, how can I implement this code as Arduino Ide coding, because it does not work properly
Thanks

int flexg = flexR;
 for (int i = 0; i<=9600; i++) {                
    if (flexg>threshold) && (flexg(i-1)<=flexg(i)) && (flexg(i)>=flexg(i+1))        
      morse =1;
 else if (flexg>threshold) && (flexg(i-1)==flexg(i)) && (flexg(i)==flexg(i+1))
 morse =0; 
 else
 break; }
 }

I can't make any sense of that code.

Is "flexg" supposed to be a variable and an array or a function?

Actually it is a variable which gives resistance value when I use serial.print

The snippet you posted cannot be converted to C/C++ until you understand exactly what it is supposed to do.