Facebook
From ja, 1 Month ago, written in Plain Text.
Embed
Download Paste or View Raw
Hits: 114
  1. <html lang="pl">
  2. <head>
  3. <meta charset="UTF-8">
  4. <meta name="viewport" c initial-scale=1.0">
  5. <title>Document</title>
  6. <link rel="stylesheet" href="style.css">
  7. </head>
  8. [removed][removed]
  9. <body>
  10.  
  11. <img src="cloud.webp"  120%;
  12.                              margin-top: -40px;
  13.                              height: 200px;
  14.                              transform: rotateX(180deg);">
  15.  
  16. <div class="calc">
  17.        
  18.     &lt;input type="text" id="liczba1" placeholder="X"&gt;
  19.  
  20.     <select class="type_input">
  21.         <option value="dodaj" >+</option>
  22.         <option value="odejmij" >-</option>
  23.         <option value="mnoz" >*</option>
  24.         <option value="dziel" >/</option>
  25.         <option value="poteguj" >^</option>
  26.         <option value="pierwiastkuj" >v</option>
  27.     </select>
  28.  
  29.     &lt;input type="text" id="liczba2" placeholder="Y"&gt;
  30. </div>
  31.  
  32. <div class="koniec">
  33.     <h2>Wynik:</h2>
  34.     <div id="wynik"></div>
  35. </div>
  36.  
  37. <div class="inp">
  38.     <label for="losowanie">&lt;input type="checkbox" id="losowanie" value="losowanie"&gt;Losowanie (x do y)</label>
  39.     <label for="pokaz">&lt;input type="checkbox" id="pokaz" value="pokaz"&gt;Pokaż wynik bezwzględny</label>
  40.     <label for="wieksza">&lt;input type="checkbox" id="wieksza" value="wieksza"&gt;Zwróć największą liczbę całkowitą mniejszą lub równą wynikowi</label>
  41.     <label for="mniejsza">&lt;input type="checkbox" id="mniejsza" value="mniejsza"&gt;Zwróć najmniejszą liczbę całkowitą większą lub równą wynikowi</label>
  42. </div>
  43.  
  44. <img src="cloud.webp"  120%;
  45.                              height: 200px;">
  46.  
  47. &lt;/body&gt;
  48. &lt;/html&gt;
  49.  
  50.  
  51.  
  52.  
  53. body{
  54.     background-color: rgba(202, 234, 239, 0.609);
  55. }
  56.  
  57. div.calc{
  58.     display: flex;
  59.     flex-direction: row;
  60.     justify-content: center;
  61.     align-items: center;
  62. }
  63.  
  64. div.calc input{
  65.     margin: 10px;
  66.     border: solid rgb(248, 188, 198);
  67.     border-radius: 20px;
  68.     text-align: center;
  69.     color: blue;
  70.     background-color: rgba(241, 212, 217, 0.72);
  71.     width: 100px;
  72.     height: 40px;
  73. }
  74.  
  75. div.calc select{
  76.     margin: 10px;
  77.     border: solid pink;
  78.     border-radius: 15px;
  79.     text-align: center;
  80.     color: blue;
  81.     background-color: rgba(241, 212, 217, 0.72);
  82.     width: 60px;
  83.     height: 30px;
  84. }
  85.  
  86. div.koniec{
  87.     display: flex;
  88.     flex-direction: row;
  89.     justify-content: center;
  90.     align-items: center;
  91.     color: blue;
  92. }
  93.  
  94. h2{
  95.     text-align: center;
  96. }
  97.  
  98. #wynik{
  99.     display: flex;
  100.     flex-direction: column;
  101.     justify-content: center;
  102.     align-items: center;
  103.     font-size: 25px;
  104.     padding-left: 3px;
  105. }
  106.  
  107. div.inp{
  108.     display: flex;
  109.     flex-direction: column;
  110.     align-items: center;
  111.     justify-content: center;
  112.     padding-top: 50px;
  113. }
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120. function dodaj(){
  121.     var liczba1=parseInt(document.getElementById("liczba1").value);
  122.     var liczba2=parseInt(document.getElementById("liczba2").value);
  123.     var wynik1=liczba1+liczba2;
  124.     document.getElementById("wynik")[removed]=wynik1;
  125.  }
  126. function odejmij(){
  127.     var liczba1=parseInt(document.getElementById("liczba1").value);
  128.     var liczba2=parseInt(document.getElementById("liczba2").value);
  129.     var wynik2=liczba1-liczba2;
  130.     document.getElementById("wynik")[removed]=wynik2;
  131. }
  132. function mnoz(){
  133.     var liczba1=parseInt(document.getElementById("liczba1").value);
  134.     var liczba2=parseInt(document.getElementById("liczba2").value);
  135.     var wynik3=liczba1*liczba2;
  136.     document.getElementById("wynik")[removed]=wynik3;
  137.  }
  138. function dziel(){
  139.     var liczba1=parseInt(document.getElementById("liczba1").value);
  140.     var liczba2=parseInt(document.getElementById("liczba2").value);
  141.     var wynik4=liczba1/liczba2;
  142.     document.getElementById("wynik")[removed]=wynik4;
  143. }
  144. function poteguj(){
  145.     var liczba1=parseInt(document.getElementById("liczba1").value);
  146.     var liczba2=parseInt(document.getElementById("liczba2").value);
  147.     var wynik5=Math.pow(liczba1,liczba2);
  148.     document.getElementById("wynik")[removed]=wynik5;
  149. }
  150. function pierwiastkuj(){
  151.     var liczba1=parseInt(document.getElementById("liczba1").value);
  152.     var liczba2=parseInt(document.getElementById("liczba2").value);
  153.     var wynik6=liczba2**(1/liczba1)
  154.     document.getElementById("wynik")[removed]=wynik6;
  155. }