dimanche 5 mars 2017

I cannot figure out these errors in my C program

I am getting some errors in my if else if else statements.

Here are the errors :

test.c:82:9: error: expected identifier or '('
        if (leftSum >=  rightSum && rightSum >= crossSum){
        ^

test.c:85:11: error: expected identifier or '('
          else if (rightSum >= leftSum && rightSum >= crossSum){
          ^

test.c:88:11: error: expected identifier or '('
          else {

This is my if else if else statement

    if(leftSum >=  rightSum && rightSum >= crossSum)
    {
        return(leftLow, leftHigh, leftSum);
      }
      else if(rightSum >= leftSum && rightSum >= crossSum)
      {
          return(rightLow, rightHigh, rightSum);
        }
      else 
      {
          return(crossLow, crossHigh, crossSum);
        }
}

Thanks for your time

Aucun commentaire:

Enregistrer un commentaire