Facebook
From witryny, 5 Years ago, written in HTML5.
Embed
Download Paste or View Raw
Hits: 193
  1. <title> tekst </title>
  2. <meta charset="UTF-8">
  3. <meta http-equiv ="refresh" content="5">
  4. <meta http-equiv ="Content-Language" content="pl">
  5. <meta http-equiv ="reply-to" content="[email protected]">
  6. <meta http-equiv ="creation-date" content="2018-09-11T09:00:18Z">
  7. <meta http-equiv ="default-style" content="style">
  8. <meta name ="author" content="Jan Kowalski"> <!--autor strony-->
  9. <meta name ="generation" content="Notepad"> <!--edytor tekstu-->
  10. <meta name ="robots" content="index"> <!--indeksowanie strony-->
  11. <meta name ="copyright" content="(c)2018 Jan Kowalski"> <!--prawa autorskie-->
  12. <meta name ="description" content="Strona Rozdział 2"> <!--opis strony-->
  13. <meta name ="keywords" content="Strona, html, nauka"> <!--wyrazy kluczowe-->
  14.  
  15.  
  16.  
  17.  
  18.  
  19.  
  20.  
  21. <script type="text/javascript">
  22.  
  23.  
  24.  
  25. var a = prompt("podaj wartosc A:","");
  26. if (a==0)
  27. {
  28. alert("to nie jest równanie kwadratowe");     
  29. location.reload();
  30. }
  31.  
  32. var b = prompt("podaj wartosc B:","");
  33. var c = prompt("podaj wartosc C:","");
  34. var delta=b*b-4*a*c;
  35.  
  36.  
  37.  
  38.  
  39. if (delta<0)
  40.         alert("Nie ma rozwiazania!");
  41.        
  42.         document.write();
  43. else if (delta>0)
  44. {
  45.         alert("Ma dwa pierwiastki<br> x1= "+(-b-Math.sqrt(delta)/2/a)+" x2= "+(-b+Math.sqrt(delta)/2/a));
  46.        
  47. }
  48. else if (delta==0)
  49. {
  50.         alert("Ma jeden pierwiastek x= "+(-b/2/a));
  51.        
  52. }
  53.  
  54.  
  55. </head>
  56.  
  57. <p id="wynik"></p>
  58.  
  59.  
  60. a = <input type="number">
  61. b = <input type="number">
  62. c = <input type="number">
  63. <input type="button" onclick="licz()" value="licz">
  64.  
  65.  
  66.  
  67.  
  68.  
  69. </body>
  70. </html>
  71.