LukaszPanko

Skrypt 16

Nov 23rd, 2020
40
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var liczba =  Number (prompt("Podaj liczbe: "));
  2. if(liczba>=0){document.write("Wartość bezwzględna z podanej liczby wynosi: "+liczba);
  3. }
  4. if(liczba<0){
  5.     liczba=liczba*(-1);
  6.     document.write("Wartość bezwzględna z podanej liczby wynosi: "+liczba);
  7. }
Add Comment
Please, Sign In to add comment