Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script>
- var x=prompt("Podaj liczbe a");
- var y=prompt("Podaj liczbe b");
- x=parseInt(x);
- y=parseInt(y);
- if(x==0)
- {
- document.write("Nie da się dzielić przez 0");
- }
- else
- {
- if(y%x==0)
- {
- document.write("Liczba b: "+y+"dzieli się przez liczbe a: "+x)
- }
- else
- {
- document.write("Liczba b: "+y+" nie jest podzielna przez liczbe a: "+x);
- }
- }
- </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement