diff --git a/exemplos/gabriel_henrique/desafio-if-else.php b/exemplos/gabriel_henrique/desafio-if-else.php new file mode 100644 index 0000000..77bd70b --- /dev/null +++ b/exemplos/gabriel_henrique/desafio-if-else.php @@ -0,0 +1,31 @@ +Aluno 1:

"; + +if ($presencasAluno1 >= $minimoPresencas) { + echo "

Sua frequência é suficiente. Aprovado!

"; +} else { + echo "

Sua frequência é insuficiente. Reprovado!

"; +} + +//Caso 2: Aluno Reprovado +$presencasAluno2 = 2; + +echo "

Aluno 2:

"; + +if ($presencasAluno2 >= $minimoPresencas) { + echo "

Sua frequência é suficiente. Aprovado!

"; +} else { + echo "

Sua frequência é insuficiente. Reprovado!

"; +} + +?> \ No newline at end of file diff --git a/exemplos/gabriel_henrique/index.php b/exemplos/gabriel_henrique/variaveis.if.else.php similarity index 99% rename from exemplos/gabriel_henrique/index.php rename to exemplos/gabriel_henrique/variaveis.if.else.php index d01272d..d15825f 100644 --- a/exemplos/gabriel_henrique/index.php +++ b/exemplos/gabriel_henrique/variaveis.if.else.php @@ -24,7 +24,8 @@ // Mostra mensagem de reprovação caso // a nota seja menor que ou igual a 6 echo "

A nota $nota do aluno não foi o suficiente. Aluno reprovado

"; - }) + } + ?> \ No newline at end of file