Advertisement
JakubJaneczek

z16

Nov 27th, 2020 (edited)
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <script>
  2. var x=prompt("Podaj liczbe");
  3. x=parseInt(x);
  4. if(x>0)
  5. {
  6.     document.write("Wartość bezwględna to: "+x);
  7. }
  8. else if(x<0)
  9. {
  10.     document.write("Wartość bezwględna to: "+x*-1);
  11. }
  12. </script>
  13.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement