Operator

Operator is a symbol that tells the compiler to perform specific mathematical, relational or logical operation and produce final result.

CODE

static void Main(string[] args) {
    int a = 5;
    int b = 2;
    int add = a + b;
    int sub = a - b;
    int mul = a * b;
    //when it comes to Division a divided by b, Quotient Value will be taken
    int div = a / b;
    //Modulus is same as that of Division, only difference is instead of getting Quotient value it will get Remainder value
    int mod = a % b;
    Console.WriteLine(add); //Output = 7
    Console.WriteLine(sub); //Output = 3
    Console.WriteLine(mul); //Output = 10
    Console.WriteLine(div); //Output = 2
    Console.WriteLine(mod); //Output = 1
}


(Click Here, For more exercises)