Advertisement
Guest User

Untitled

a guest
Sep 23rd, 2019
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. <html>
  2. <head>
  3. <meta chardet=utf-8">
  4. <title>SSU 2</title>
  5. </head>
  6. <body>
  7. <script>
  8. var a = prompt("Podaj 1 liczbe");
  9. var b = prompt("Podaj 2 liczbe");
  10. var c = prompt("Podaj 3 liczbe");
  11.  
  12. var x = parseInt(a);
  13. var y = parseInt(b);
  14. var z = parseInt(c);
  15.  
  16. if(( x >= y) && ( y>= z)) {
  17. document.write(x+" " +y+" " +z);
  18. } else if (( y >= x) && (x >= z)) {
  19. document.write(y+ " " + x + " " +z);
  20. } else if (( z >= x) && (x >= y)) {
  21. document.write(z+ " " +x+" " +y);
  22. } else if (( z >= y) && ( y >= x)) {
  23. document.write(z+ " " +y+" " +x);
  24. } else if (( y >= z) && ( z >= x)) {
  25. document.write(y + " " +z+ " " +x);
  26. } else if ((x >= y) && (z >= y)) {
  27. document.write(x + " " + z + " " + y);
  28. }
  29. </script>
  30. </body>
  31. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement