From 220741c303948f9c7d5744e920e8ecedab16211b Mon Sep 17 00:00:00 2001 From: 2024 - Gabriel Henrique Date: Thu, 21 May 2026 20:30:21 -0300 Subject: [PATCH] Realizado desafio if-else --- exemplos/gabriel_henrique/desafio-if-else.php | 31 +++++++++++++++++++ .../{index.php => variaveis.if.else.php} | 3 +- 2 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 exemplos/gabriel_henrique/desafio-if-else.php rename exemplos/gabriel_henrique/{index.php => variaveis.if.else.php} (99%) 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