Esercizio

  • November 2019
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Esercizio as PDF for free.

More details

  • Words: 169
  • Pages: 3
SOLUZIONE (18-09-06) <Script language="JavaScript"> function CALCOLA() { /*Variabili*/ A=parseInt(FORM.N1.value); B=parseInt(FORM.N2.value); C=parseInt(FORM.N3.value); MAX=0; MIN=100000; MED=0; CON=0; /*end variabili*/ /*controllo inserimento*/ if(isNaN(A)) { CON=(CON+1); } if(isNaN(B)) { CON=(CON+1); } if(isNaN(C)) { CON=(CON+1); } if(CON>0) { document.getElementById("RIS").style.display="none"; alert("I PARAMETRI NON SONO STATI INSERITI CORRETTAMENTE!"); return; } /*end controllo inserimento*/ /*calcolo massimo*/

if(A>MAX) { MAX=A; } if(B>MAX) { MAX=B; } if(C>MAX) { MAX=C; } /*end calcolo massimo*/ /*calcolo minimo*/ if(A<MIN) { MIN=A; } if(B<MIN) { MIN=B; } if(C<MIN) { MIN=C; } /*end calcolo minimo*/ /*calcolo media*/ MED=(A+B+C)/3; /*end calcolo media*/ /*visualizzazione*/ FORM.VMA.value=(MAX) FORM.VMI.value=(MIN) FORM.VME.value=(MED) /*end visualizzazione*/

/*comparsa risultati*/ document.getElementById("RIS").style.display=""; /*end comparsa risultati*/ }

Primo numero:

Secondo numero:

Terzo numero:


Related Documents

Esercizio
July 2020 15
Esercizio
November 2019 18
Esercizio
November 2019 19
Esercizio 1
June 2020 12
Esercizio - [n.6]
May 2020 3
Esercizio- [n.1]
May 2020 8