APSC 160 Chapter Notes - Chapter 4.1: Logical Conjunction, Logical Disjunction

34 views2 pages
31 Aug 2016
School
Department
Course

Document Summary

Relational operators are > which compares whether one value is greater than the other : for example, int x = 3, int y = 2 ; if we use x > y then it returns true. If we use x < y then it returns false. >= : this operator greater than or equals to compare whether one value is greater than or equal to other value. For example, int x =5 ,y = 5, x>=y returns true because x is not greater than y but x is equal to y. X <= y so it also returns true. == this operator checks if the values of two variables are equal or not. It is not same as single = operator because it is used to assign value to a variable which == compares values of two variables. For example: int a = 3, int b = 3 when we say a == b then it returns true.

Get access

Grade+
$40 USD/m
Billed monthly
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
10 Verified Answers
Class+
$30 USD/m
Billed monthly
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
7 Verified Answers

Related Documents

Related Questions