# Parentheses or Brackets Problem?

I get this error, but I can't find where I forgot a paren / bracket...

int SUM1 = 0; if ( (length == 13) || (length == 15) ) { for (int a = 1; a < length; a++2) { int prodig = name[a] * 2; sprintf(dist, "%d", prodig); if (strlen(dist) == 2) { SUM1 = SUM1 + dist + dist; } else { SUM1 += dist; } }

``````}

if (length == 16)
{
for (int a = 1; a < length + 1; a++2)
{
int prodig = name[a] * 2;
sprintf(dist, "%d", prodig);
if (strlen(dist) == 2)
{
SUM1 = SUM1 + dist + dist;
}
else
{
SUM1 += dist;
}
}
}
``````

Error:

credit.c:21:40: error: expected ')'

``````    for (int a = 1; a < length; a++2)
^
``````

credit.c:21:13: note: to match this '('

``````    for (int a = 1; a < length; a++2)

^
``````

credit.c:39:44: error: expected ')' for (int a = 1; a < length + 1; a++2) ^ credit.c:39:13: note: to match this '('

``````    for (int a = 1; a < length + 1; a++2)
``````

``````for (int a = 1; a < length; a++2)
The problem lies in the last clause of the for statement. `a++2` is invalid. The increment operator, `++` can't be followed by that 2. It increments the preceding by 1 and only 1. If you want to actually increment by 2, you need something different, like `a = a + 2`.