Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const l1 = prompt('podaj liczbę całkowitą (1/2)') * 1;
- const l2 = prompt('podaj liczbę całkowitą (2/2)') * 1;
- if (l1 === 0){
- alert('Nie dziel przez 0!');
- }
- else if (l2%l1 === 0){
- alert(`${l2} jest podzielna przez ${l1}`);
- console.log(`${l2} jest podzielna przez ${l1}`);
- }
- else{
- alert(`${l2} nie jest podzielna przez ${l1}`);
- console.log(`${l2} nie jest podzielna przez ${l1}`);
- }
Add Comment
Please, Sign In to add comment