Question: Operators connect constants and variables to form expressions. The arithmetic operators include: + Addition - Subtraction * Multiplication / Division & Minimum ! Maximum #

Operators connect constants and variables to form expressions. The arithmetic operators include:
+ Addition
- Subtraction
* Multiplication / Division
& Minimum
! Maximum
# Modulo
1+2=3
3-2=1
2*3=6
3/2=1(Integer division only)2&3=2
2!3=3
13#5=3(Remainder after division)
An important feature of these, and all operators, is that evaluation in an expression takes place STRICTLY FROM LEFT TO RIGHT. Parentheses may be used to group parts as in algebra.
The & (minimum),!(maximum), and # (modulo) operators are probably less familiar than the other four operators. Below are some examples of how they can be used:
X#10=
X&10=
X!10=
X!1&10= X if X is between 1 and 10,1 is X is less than 1,
Remainder of X/10
X if X is less than 10, otherwise 10
X if X is greater than 10, otherwise 10
and 10 if X is greater than 10 Positive value of X
-X!X =
Question: Now for an example. What is 1+1*3/2+7#12?
A.9
B.7
C.0
D.10
E.-131071
F. None of the above

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!