A)
Relational Operators:
Relational operators are used to compare numeric and character values using the following operators:
- Greater than (>)
- Less than (<)
- Greater than or equal to (>=)
- Less than or equal to (<=)
- Equal to (==)
- Not equal to (!=)
These operators will determine whether specific relationship exists between two values of same type.
Relational Expression:
- Relational operators are “binary”, so it needs two operands for comparison. Consider the following expression using the less-than operator:
A < B
- The above expression is called a “relational expression”. It is used to find whether “A” is less than “B”.
- Relational expression is also referred as “Boolean expression”, because the resultant value of all relational expression is either “True” or “False”. But the states of Boolean values are stored as 0 and 1.
- Hence, if the resultant value of relational expression is 0, then the expression is “False”. If the resultant value of relational expression is 1, then the expression is “True”.
Evaluating the given relational expression with “yes” or “no”:
B)
Relational Operators:
Relational operators are used to compare numeric and character values using the following operators:
- Greater than (>)
- Less than (<)
- Greater than or equal to (>=)
- Less than or equal to (<=)
- Equal to (==)
- Not equal to (!=)
These operators will determine whether specific relationship exists between two values of same type.
Relational Expression:
- Relational operators are “binary”, so it needs two operands for comparison. Consider the following expression using the less-than operator:
A < B
- The above expression is called a “relational expression”. It is used to find whether “A” is less than “B”.
- Relational expression is also referred as “Boolean expression”, because the resultant value of all relational expression is either “True” or “False”. But the states of Boolean values are stored as 0 and 1.
- Hence, if the resultant value of relational expression is 0, then the expression is “False”. If the resultant value of relational expression is 1, then the expression is “True”.
Evaluating the given relational expression with “yes” or “no”:
C)
Relational Operators:
Relational operators are used to compare numeric and character values using the following operators:
- Greater than (>)
- Less than (<)
- Greater than or equal to (>=)
- Less than or equal to (<=)
- Equal to (==)
- Not equal to (!=)
These operators will determine whether specific relationship exists between two values of same type.
Relational Expression:
- Relational operators are “binary”, so it needs two operands for comparison. Consider the following expression using the less-than operator:
A < B
- The above expression is called a “relational expression”. It is used to find whether “A” is less than “B”.
- Relational expression is also referred as “Boolean expression”, because the resultant value of all relational expression is either “True” or “False”. But the states of Boolean values are stored as 0 and 1.
- Hence, if the resultant value of relational expression is 0, then the expression is “False”. If the resultant value of relational expression is 1, then the expression is “True”.
Evaluating the given relational expression with “yes” or “no”:
Want to see the full answer?
Check out a sample textbook solutionChapter 4 Solutions
EBK STARTING OUT WITH C++
- Question 37 The correct statements are: If both L and ¬L are in D, then L must be also in SD. If both L and ¬L are in D, then ¬L must be also in SD. If both L and ¬L are in SD, then L must be also in D. If both L and ¬L are in SD, then ¬L must be also in D.arrow_forwardPQ TT FT TF FF The definition of "P if and only if Q" (abbreviated Piff Q and symbolized as or ) is defined to be". Construct a truth table to show that "iff" means the same thing, as "has the same true value as". Be sure the explain how the truth table helps you answer this question.arrow_forwardQuestion 2 Consider the correctness statement x == x { x = x + 1; } P where x has type integer. The correctness statement is valid when P is the assertion: Ox>0 Ox 1 Ox< 1 false The correctness statement is invalid in all above cases.arrow_forward
- Which of the following statements is or are always true? ( If A then B) and ( If B then C) are strong rules with respect to support and confidence this implies that ( if A then C) is also a strong rule. IL If (A then C) and (if B then C) are strong rules with respect to support and confidence this implies that ( if A and B then C) is also a strong rule. O a. neither I not II O b. only II Oc. I and II O d. only Iarrow_forwardTell if the statements are true or false. Let p: 2 + 1 = 3; q: 16 − 9 = 7. (a) ~p ∨ q TrueFalse (b) ~p ∧ ~q TrueFalse (c) ~(p ∧ q) TrueFalsearrow_forwardwrite the argument using propositional wffs (use the statement letters shown). Then, using propositional logic, It is not the case that if electric rates go up, then usage will go down, nor is it true that either new power plants will be built or bills will not be late. Therefore, usage will not go down and bills will be late. R, U, P, Barrow_forward
- Today we learned how to build truth tables in order to understand our symbolic statements better. Build a truth table (that's right, the entire truth table) for the following statements: 1. ~ B ∨ X2. A • ~ Z 3. ~ X ⊃ ~ C 5. ~ (C ∨ (X • ~ Y)) 6. (X ⊃ ~ A) ⊃ (~ Z • B) 7. ~ (A ∨ ~ X) ∨ (C • ~ Y) 11. ~ X ∨ (Q ⊃ Z) 12. ~ Q • (A ⊃ (P • ~ B)) 13. ~ (Q • ~ Z) ⊃ (~ P ⊃ C) 15. ~ P ∨ (Q ∨ P)arrow_forward► Construct a formal proof of validity for the following arguments: - If rain continues, then the river rises. If rain continues and the river rises, then the bridge will wash out. If continuation of the rain would cause the bridge to wash out, then a single road is not sufficient for the town. Either a single road is sufficient for the town or the traffic engineers have made a mistake. Therefore, the traffic engineers have made a mistake. Let: p: The rain continues. q: The river rises. r: The bridge will wash out. s: A single road is sufficient for the town. t: The traffic engineers have made a mistake.arrow_forwardWrite TRUE if the statement is true, otherwise, write FALSE. The statement (¬P ∨ Q) ∧ (¬Q ∨ P) is a contradiction.arrow_forward
- Question 42 The correct statements are: If L₁ is reducible to L2 and L₂ is not in D, then L₁ cannot be in D. If L₁ is reducible to L₂ and L₁ is not in D, then L₂ cannot be in D. If L₁ is reducible to L2 and L₂ is not in SD, then L₁ cannot be in SD. If L₁ is reducible to L₂ and L₁ is not in SD, then L₂ cannot be in SD.arrow_forwardLet Q(x, y) be the statement "x+y=x-y." If the domain for both variables consists of all integers, what are the truth values of 3xQ(x, 2) ? True Falsearrow_forwardQuestion 25 The following two statements are logically equivalent: (p → q) ∧ (r → q) (p ∧ r) → q You can use truth tables to determine equivalency Group of answer choices True Falsearrow_forward
- Programming Logic & Design ComprehensiveComputer ScienceISBN:9781337669405Author:FARRELLPublisher:Cengage