Advertisement
Guest User

Untitled

a guest
Jan 24th, 2017
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. // part 1 - a conditional in parentheses
  2. // part 2 - a true part (if the condition is true)
  3. // part 3 (optional) - an else part
  4.  
  5. if (score >= 70)
  6. grade = 'P';
  7. else
  8. grade = 'F';
  9.  
  10. a < b //: is a less than b?
  11. a > b //: is a greater than b
  12. a <= b //: is a less than or equal to b
  13. a >= b //: is a greater than or equal to b
  14. a == b //: is a equal to b
  15. a != b //: is a not equal to b
  16.  
  17. ///////////////////////////
  18.  
  19. a: 5,
  20. b: 6,
  21. c: 7,
  22.  
  23. c // True
  24. 0 // False
  25. a < b // True
  26. a == b // False
  27. a != 6 // True
  28. c >= 7 //True
  29. (a+b) > c // True
  30. !(a<b) // False
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement