There are plenty of different types of Math you can do in a program but we will just go over the four basic ones: Adding, Subtracting, Division and Multiplication.
We will start out with Adding and Subtracting:
To do this, add the following lines of code to a console program:
Int32 x = 4;
Int32 y = 2;
Int32 adding;
adding = x + y;
Console.WriteLine(String.Concat(x.ToString(), "+", y.ToString(), "=", adding.ToString()));
Int32 subtracting;
subtracting = x - y;
Console.WriteLine(String.Concat(x.ToString(), "-", y.ToString(), "=", subtracting.ToString()));
Console.ReadKey();
This is how to Multiply and Divide:
Double x = 4.25;
Double y = 5;
Double multiplying; multiplying = x * y;
Console.WriteLine(String.Concat(x.ToString(), "*", y.ToString(), "=", multiplying.ToString()));
Double dividing;
dividing = x / y;
Console.WriteLine(String.Concat(x.ToString(), "/", y.ToString(), "=", dividing.ToString()));
Console.ReadKey();