Advertisement
wiktormadera

Zad10JS

Nov 27th, 2020
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. const a = Number(prompt(`Podaj dzielnik`, 1))
  2. if(a === 0) alert('Nie wolno dzielić przez 0!')
  3. else {
  4.     const b = Number(prompt(`Podaj liczbe dzieloną`, 0))
  5.     const podzielna = b % a === 0
  6.     if(podzielna) document.write(`Liczba b: ${b} jest podzielna przez a: ${a}`)
  7.     else document.write(`Liczba b: ${b} nie jest podzielna przez a: ${a}`)
  8. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement