Introduction to C language yesterday. I have a question about if and else

Asked 2 years ago, Updated 2 years ago, 85 views

I have a question about the C language-based robot programming called Lego Mind Storm Masters! You put if in else again.

after execution In the loop Operation if sensor 1 is greater than 50 Add conditions to the else If it doesn't meet those conditions, I wonder how to program adding conditions. I can only put one ifelse in the loop. Tell me the solution! It's not c++, it's just c.

if문 else c lego

2022-09-22 15:04

1 Answers

I don't know what you're talking about, but...

if (Conditional)
{
   .......
}
else
{
    if (conditional expression)
    {
        .......
    }
    else
    {
        if (conditional expression)
        {
            ........
        }
        else
        {
            ........
        }
    }
}

Do you mean this kind of structure?


2022-09-22 15:04

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.