Embedding if fuction (double and/or triple if)

hello guys, i'm pretty new at arduino programming and i want to create a function that needs to be done with embedded or any other way that you guys could tell me, here is the code, the problem is that after i upload the program to the arduino it continually reads both ifs even thought the second one is embedded in the else function

 if (cm>80 || cm==0)
   
   analogWrite(forw,150), analogWrite(turbo,80), analogWrite(right,0), myservo.write(90);
 
     else
         analogWrite(forw,0), analogWrite(right,0), analogWrite(turbo,0), myservo.write(0);
         delay(1000);
            if (cm>80 || cm==0) (forw,0), analogWrite(right,255), analogWrite(turbo,0), myservo.write(0);
            delay(1000);

If you want more than one line to be controlled by an if, you must enclose them in { and }:

if (cm>80 || cm==0)
{
  analogWrite(forw,150);
  analogWrite(turbo,80);
  analogWrite(right,0);
  myservo.write(90);
} else {
  analogWrite(forw,0);
  analogWrite(right,0);
  analogWrite(turbo,0);
  myservo.write(0);
  delay(1000);
  if (cm>80 || cm==0) 
  {
    analogWrite(forw,0);
    analogWrite(right,255);
    analogWrite(turbo,0);
    myservo.write(0);
    delay(1000);
  }
}

Only the analogWrite is part of the else clause.
Try braces {}

majenko:
If you want more than one line to be controlled by an if, you must enclose them in { and }:

I would go so far as to say that conditional code paths should always be enclosed by braces to turn them into a compound statement, even when they only contain a single statement. It avoids any maintenance-induced errors and also avoids any doubt about whether subsequent statements were intended to be conditional or not.

Indenting has no effect in C/C++, if is the braces that determine how the code is interpreted. Indenting is just used by programmers to help make code more readable.