Describe numerical, relational, and logical expressions. Include the type of operators each contains and the type of value (numerical or boolean) it produces when evaluated.
Numerical Expressions:Numerical operators are used on two operands then those expressions are called as Numerical expressions.
2+3=5 (+ operator it returns a numerical value)
5-3=2(- operator it returns a numerical value)
5*2=10(* operator it returns a numerical value)
10%2=0(% operator it returns a numerical value)
10/2=5 (/ operator it returns a numerical value)
Relational Expressions:Relational operators are used to compare two operands.These operator will returns TRUE or FALSE,if condition satisfy it will return TRUE otherwise it will returns FALSE
3>5(> greater than operator)
3<5(< lessthan operator)
5==5 (comparision operator)
3>=5(less than or equal operator)
3<=5(greater than or equal opearator)
3!=5(not equal operator)
Logical expressions:
&&-logical AND it returns TRUE if both conditions are TRUE
||-Logical OR it returns TRUE atleat one of the condition is TRUE
!-Logical NOT it reverse the operand state
Get Answers For Free
Most questions answered within 1 hours.