dimanche 7 avril 2019

How to translate if .. else statement with goto?

I have to translate nested-if..else conditions to goto labels in C code. I know that I have to start with outer if-s, but how to translate the inner if-s with goto?

Example: if(condition)
          {
            if(condition)
            {
             if(condition)
              {
                statements;
              }
              if(condition) return;
              statements;
            }  
          }
        else statements;

Aucun commentaire:

Enregistrer un commentaire