Your if statement should be:
if(turtles == 0)
At the moment, it contains an assignment, which is why you're getting the error.
You may want to consider putting your print line after the while loop has terminated, since coins doesn't appear to be scoped to the while loop. If turtles is always going to be positive at the start of your block of code, then you wouldn't need the if statement, since the termination clause of the while loop would mean that turtles was 0 when it exited.
If you do still need the if statement (because turtles may start off at -1 for example), then moving the if statement out of the while clause would probably still offer you a small performance improvement since the evaluation wouldn't need to be performed for each loop iteration. In your specific case, given the small number of iterations, the impact would be minimal (the compiler may even be optimizing it for you), but it's something you might want to consider for the future.
while (turtles > 0) {
turtles = turtles - 1;
coin++;
}
if (turtles == 0) // not needed if turtles is unsigned
printf("Now you have %d coins\n", coin);