Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script>
- function wyznacz() {
- var P = document.getElementById("P").value;
- var N = document.getElementById("N").value;
- var R = document.getElementById("R").value;
- if(isNaN(P) || isNaN(N) || isNaN(R)){
- window.alert("wpisz poprawne dane");
- } else {
- P = parseFloat(P);
- N = parseFloat(N);
- R = parseFloat(R);
- var max = Math.max(P, N, R);
- document.getElementById("skrypt").innerHTML = "Najwyższa średnia:<br>" + max;
- }
- }
- </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement