Advertisement
Guest User

Untitled

a guest
Jan 16th, 2018
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.12 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 = 25;
  7. var shirtLength = 32;
  8. var shirtSleeve = 8.89;
  9.  
  10. // your code goes here
  11.  
  12. if ((shirtWidth >= 18 && shirtWidth < 20 ) && (shirtLength === 28) && (shirtSleeve >= 8.13 && shirtSleeve < 8.38))
  13. {
  14. console.log("S");
  15. }
  16. else if ((shirtWidth >= 20 && shirtWidth < 22 ) && (shirtLength === 29) && (shirtSleeve >= 8.38 && shirtSleeve < 8.63))
  17. {
  18. console.log("M");
  19. }
  20. else if ((shirtWidth >= 22 && shirtWidth < 24 ) && (shirtLength === 30 )&& (shirtSleeve >= 8.63 && shirtSleeve < 8.88))
  21. {
  22. console.log("L");
  23. }
  24. else if ((shirtWidth >= 24 && shirtWidth < 26 ) && (shirtLength >= 31 && shirtLength ===32) && (shirtSleeve >= 8.88 && shirtSleeve < 9.63))
  25. {
  26. console.log("XL");
  27. }
  28. else if ((shirtWidth >= 26 && shirtWidth < 28 ) && (shirtLength === 33) && (shirtSleeve >= 9.63 && shirtSleeve < 10.13))
  29. {
  30. console.log("2XL");
  31. }
  32. else if ((shirtWidth === 28) && (shirtLength === 34) && (shirtSleeve === 10.13))
  33. {
  34. console.log("3XL");
  35. }
  36. else
  37. {
  38. console.log(N/A);
  39. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement