sexta-feira, julho 15, 2016

TPI - Situação de Decisão em PHP

<html>

    <head>
        <meta charset="UTF-8"/>
        <link rel="stylesheet" href="_css/estilo.css"/>
        <title></title>
    </head>

    <body>
        <div>

            <?php
                $nota1 = $_GET["n1"];
                $nota2 = $_GET["n2"];
                $m = ($nota1 + $nota2)/2;
                echo "A média de $nota1 e $nota2 é $m<br/>";

                $_sit = ($m<6)?"REPROVADO":"APROVADO";

                echo "O aluno foi $_sit com a média $m";
            ?>

        </div>
    </body>

</html>

Nenhum comentário:

Postar um comentário