Advertisement
Guest User

Untitled

a guest
Aug 20th, 2017
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.24 KB | None | 0 0
  1. /*
  2. * Programming Quiz: What do I Wear? (3-7)
  3. */
  4.  
  5. // change the values of `shirtWidth`, `shirtLength`, and `shirtSleeve` to test your code
  6. var shirtWidth = 18;
  7. var shirtLength = 29;
  8. var shirtSleeve = 8.47;
  9.  
  10. // your code goes here
  11. if (((shirtWidth >= 18) && (shirtWidth < 20)) && ((shirtLength >= 28) && (shirtLength < 29)) && ((shirtSleeve >= 8.13) && (shirtSleeve < 8.38))) {
  12. console.log("S");
  13. } else if (((shirtWidth >= 20) && (shirtWidth < 22)) && ((shirtLength >= 29) && (shirtLength < 30)) && ((shirtSleeve >= 8.38) && (shirtSleeve < 8.63))) {
  14. console.log("M");
  15. } else if (((shirtWidth >= 22) && (shirtWidth < 24)) && ((shirtLength >= 30) && (shirtLength < 31)) && ((shirtSleeve >= 8.63) && (shirtSleeve < 8.88))) {
  16. console.log("L");
  17. } else if (((shirtWidth >= 24) && (shirtWidth < 26)) && ((shirtLength >= 31) && (shirtLength < 33)) && ((shirtSleeve >= 8.88) && (shirtSleeve < 9.63))) {
  18. console.log("XL");
  19. } else if (((shirtWidth >= 26) && (shirtWidth < 28)) && ((shirtLength >= 33) && (shirtLength < 34)) && ((shirtSleeve >= 9.63) && (shirtSleeve < 10.13))) {
  20. console.log("2XL");
  21. } else if ((shirtWidth >= 28) && (shirtLength >= 34) && (shirtSleeve >= 10.13)) {
  22. console.log("3XL");
  23. } else {
  24. console.log("N/A");
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement