O GoConqr está de visual novo! Conte para nós o que você achou.

Mapa mental

Estructuras de control selectivas

Alan Garcia Espanhol

Conteúdo do mapa

Estructuras de control selectivas

  1. It is used to make logical decisions, a condition is evaluated and a function is fulfilled, a certain sequence of instructions is carried out. These structures are classified as: Simple, Double, Multiple.

    • Simple
      • They are identified because they are composed of only one condition. The if-then structure evaluates the condition and in such a case: If the condition is true, then execute the action Yes. If the condition is false, nothing is done.
        • syntax if <Condition> hen <Action> End_if
    • Double
      • They are logical structures that allow controlling the execution of several actions and are used when you have two options of action, because of the nature of these you must execute one or the other, but not both at the same time, that is, they are mutually exclusive.
        • syntax if <condición> then <Acción S1 > else <Acción S2> End_if
    • Multiple
      • Applying the multiple decision structure will evaluate an expression that can take n different values, 1, 2, 3, ...., N and depending on whether you choose one of these values ​​in the condition, one of the n actions will be done or what is equal , the flow of the algorithm will follow only a certain path between the n possible. This structure is represented by a selector which if it takes the value 1 will execute action 1, if it takes the value 2 it will execute action 2, if it takes the value n it will perform the action n.
        • syntax switch (selector) { case 1: Action 1 break; case 2: Action 2 break; case n: Action n break; default: Excepción; break; }
    • Selective control structures allow to "select" an alternate route to solve the problem, depending on the result of evaluating a relational and / or logical expression.

Informações

Descrição
Mapa Mental sobre Estructuras de control selectivas, criado por Alan Garcia em 21-02-2019.
Criado por
Alan Garcia
Visualizações
1
Avaliação

Fale Conosco

Sobre o que é sua mensagem?

O que você acha do novo visual?

Você gostou?