SHARE
TWEET

Untitled

a guest Jul 16th, 2019 60 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <script>
  2.  
  3. function UMK() {
  4.  
  5.     var a = parseInt(document.getElementById('chempr').value);
  6.    
  7.         var b = isNaN(a) ? 0 : a*0.45;
  8.    
  9.     var c = parseInt(document.getElementById('biopr').value);
  10.        
  11.         var x = isNaN(c) ? 0 : c*0.55;
  12.    
  13.     var e = parseInt(document.getElementById('fizpr').value);
  14.    
  15.         var f = isNaN(e) ? 0 : e*0.45;
  16.    
  17.     var g = parseInt(document.getElementById('matpr').value);
  18.    
  19.         var h = isNaN(g) ? 0 : g*0.45;
  20.        
  21.         var y = isNaN(g) ? 0 : g*0.55;
  22.        
  23.     var n = Math.max(x, y);
  24.    
  25.     if (y > x) {
  26.         var m = Math.max(b, f) ;
  27.     } else {
  28.         var m = Math.max(b, f, h) ;
  29.     }
  30.    
  31.     var txt = "";
  32.     if ((m+n) >= 75) {
  33.         txt = "<b>Gratulacje, dostaniesz się!</b><br>Zeszłoroczny próg wyniósł 75<br>Twój wynik to: " + w ;
  34.     } else {
  35.         txt = "<b>Niestety, może to się nie udać.</b><br>Zeszłoroczny próg wynosi 75<br>Twój wynik to: " + w;
  36.     }
  37.     document.getElementById("UMK").innerHTML = txt;
  38. }
  39.  
  40. </script>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top