Professional Documents
Culture Documents
Ict10 Q3W1
Ict10 Q3W1
Operators
What is An Operator On C#
What are the roles of Operators on C#?
What are the Different type of Operators?
What is an operator?
An operator is a symbol used to tell the program that a calculation is to be
performed.
Operators are combined with operands to produce new values or information.
In C# programming aside from arithmetic operators such as +,-,* and/, some of the
operators are used @, <, >, %. &, and many more.
Here are the different types
of operators:
Assignment – Used to assign a value to a variable
Answer 6?
Assignment by addition (+=), Assignment by difference (-=), assignment by product (*=), and
assignment by quotient (/=) are called Shorthand assignment operators.
In the example below, Variable x is assigned with the value of 6, while hellostring variable is
assigned with the value of Hello String, and lastly, Variable y is assigned with the value of X (which is
6). Assigning a variable to another variable only means that the value of y is the same as the value
of X.
Example
Int x = 6;
Int y = x;
Arithmetic Operators Operator Symbol
Addition +
Modulus is the operation that gives the remainder of a division of two
Subtraction -
values.
Increment is the process of increasing by a specific amount, or the
Multiplication *
amount by which something increases.
Decrement To subtract a number from another number. Decrementing a Division /
counter means to subtract 1 or some other number from its current value.
Modulus %
Loop statement
Increment ++
x5
-- Decrement --
A = 5 --
4
3
2
1
0
SCAN for more Info
https://www.youtube.com/watch?v=SvD3m4apJZ4 Operators
SAMPLE: b + c (*a)
2. Add the Values of b and c and multiply the sum by the value of a. then assign the result.