Code:

```
if (n == 0 || n == 1) {
isPrime = 0;
}
else {
for(i = 2; i <= n/2; ++i) {
if(n % i == 0) {
isPrime = 0;
break;
}
}
}
```

I would do it like this...

Code:

```
if (n == 0 || n == 1)
{ isPrime = 0;
}
else
{ for(i = 2; i <= n/2; ++i)
{ if(n % i == 0)
{ isPrime = 0;
break;
} } }
```

Okay, I'm cheating on the last 3 braces, the order is wrong, but since they are the same character, I don't see a problem.