MarcinKrol

Zad 17 - JS

Nov 24th, 2020
38
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. const a = prompt('podaj początek przedziału') * 1;
  2. const b = prompt('podaj koniec przedziału') * 1;
  3. const c = prompt('podaj liczbę: ') * 1;
  4.  
  5. if (c >= a && c <= b){
  6. document.write(`liczba ${c} leży w przedziale (${a}; ${b})`);
  7. }
  8. else {
  9. document.write(`Podano nieprawidłową wartość lub kolejność`);
Advertisement
Add Comment
Please, Sign In to add comment