Please try this once.
Program - Assigning values to variables
using System;
class SampleMath
{
public static void Main()
{
double x = 2.0; // declaring a variable named x of type double & assigning it value 2.0
double y = 3.0; // declaring a variable named y of type double & assigning it value 3.0
double z ; // declaring a variable named z of type double
z = x + y;
Console.WriteLine("x = " + x + ", y = " + y + " & z = " + z);
Console.ReadLine();
}
}