ACTIVIDADE 3

<html>

<head>
    <title>Javascript</title>
    <meta charset="utf-8"/>
</head>


<body>
    <h1> ANTÍA CALCULADORA </h1>
    <FONT FACE="times new roman">ides flipar ca miña super calculadora...</FONT>
    <body style="background-color:#b2a18b;">
    <button type="button" onclick="alerta()")">Moi boas compañeirxs!!!!!!</button>
    <img src="JAVA/CALCULADORA.jpg" width=30% align= "bottom"> </img>
    <div>
    <script>
    function alerta(){
 
        var n1 = prompt("un numero");

        var n2 = prompt("outro numero");

    document.open();
  
    document.write("SUPER suma de "+ n1 + " e "+ n2 + " é: ");

    document.write(parseInt(n1)+parseInt(n2));

    document.write("<br>");

    document.write("SUPER resta de "+ n1 + " e "+ n2 + " é: ");

    document.write(parseInt(n1)-parseInt(n2));

    document.write("<br>");

    document.write("SUPER multiplicación de "+ n1 + " e "+ n2 + " é: ");

    document.write(parseInt(n1)*parseInt(n2));

    document.write("<br>");

    document.write("SUPER división de "+ n1 + " e "+ n2 + " é: ");

    document.write(parseInt(n1)/parseInt(n2));
  

    document.close();}

</script>
</div>
</body>

</html>

Comentarios

Entradas populares de este blog