How will I solve my problem : expected primary-expression before '>' token
You need curly brackets around your if block.

if (distance &gt; 10) { // this solves the problem
  car.set_speed(127);
  car.forward();
  delay(3000);
}


etc
Edit: Thanks to the commenter.