hw05_05.html 1.5 KB

1234567891011121314151617181920212223242526272829303132333435
  1. <head>
  2. <h1>sizes</h1>
  3. </head>
  4. <body>
  5. <script>
  6. let sizePants = +prompt("Enter Your size of pants ");
  7. let hipSize = +prompt("Enter Your hip size sm");
  8. let sizeSocks = +prompt("Enter Your size of socks");
  9. usaPants = "-";
  10. sizeUsa = "-";
  11. socksUsa = "-";
  12. if (sizePants == 40) usaPants = "S or 6";
  13. if (sizePants == 42) usaPants = "M or8";
  14. if (sizePants == 44) usaPants = "10";
  15. if (sizePants == 46) usaPants = "L or 12";
  16. if (sizePants == 48) usaPants = "14";
  17. if (sizePants == 50) usaPants = "XL or 16";
  18. if (sizePants == 52) usaPants = "18";
  19. if (sizePants == 54) usaPants = "XXL or 20";
  20. if (hipSize >= 89 && hipSize <= 92) sizeUsa = "XXS";
  21. if (hipSize >= 93 && hipSize <= 96) sizeUsa = "XS";
  22. if (hipSize >= 97 && hipSize <= 101) sizeUsa = "S";
  23. if (hipSize >= 102 && hipSize <= 104) sizeUsa = "M";
  24. if (hipSize >= 105 && hipSize <= 108) sizeUsa = "L";
  25. if (hipSize >= 109 && hipSize <= 112) sizeUsa = "XL";
  26. if (hipSize >= 113 && hipSize <= 117) sizeUsa = "XXL";
  27. if (hipSize >= 118 && hipSize <= 122) sizeUsa = "XXXL";
  28. if (sizeSocks == 21) socksUsa = "8";
  29. if (sizeSocks == 23) socksUsa = "9";
  30. if (sizeSocks == 25) socksUsa = "10";
  31. if (sizeSocks == 27) socksUsa = "11";
  32. alert("Your Usa size of pants is:\n" + usaPants + "\n" + 'Your USA hip size is:\n' + sizeUsa + "\n" + "Your USA socks size is:\n" + socksUsa);
  33. </script>
  34. </body>