# C# Arithmetic Operators

In c# programaming language, Arithmetic Operators are useful to perform basic arithmetic calculations like as Increment operator ++ · Decrement operator -- · Unary plus and minus operators · Multiplication operator *.

For example, you have integer variables firstNumber = 12, secondNumber = 8, and if you apply an arithmetic operator + (firstNumber + secondNumber) to perform an addition operator. you will get the result as 20 like as given below.

```using System;
public class TestInterface
{
public static void Main()
{
int sum;
int firstNumber = 12;
int secondNumber = 8;
sum = (firstNumber + secondNumber);
Console.WriteLine("The total sum is {0}",sum);
}
} ```

#### Output

The total sum is 20

The given table lists the different types of operators available in c# arithmetic operators.

 Operator Name Description Example (firstNumber = 8, secondNumber = 4) + Addition It adds two operands. firstNumber  + secondNumber = 12 - Subtraction It subtracts two operands. firstNumber - secondNumber = 4 * Multiplication multiplies two operands. firstNumber * secondNumber = 32 / Division divides numerator by de-numerator. firstNumber / secondNumber = 2 % Modulo remainder as a result firstNumber % secondNumber = 0

## C# Arithmetic Operators Example

```using System;
namespace FindAndSolve
{
public class Program
{
public static void Main(string[] args)
{
int result;
int firstNumber = 8, secondNumber = 4;
result = (firstNumber + secondNumber);
result = (firstNumber - secondNumber);
Console.WriteLine("Subtraction Operator: " + result);
result = (firstNumber * secondNumber);
Console.WriteLine("Multiplication Operator: "+ result);
result = (firstNumber / secondNumber);
Console.WriteLine("Division Operator: " + result);
result = (firstNumber % secondNumber);
Console.WriteLine("Modulo Operator: " + result);
}
}
}```