I understand that a double is a decimal. In the following program the output is 1 even though I thought it would be 1.05 repeating.
static void Main (string[] args)
{
double d = 19 / 18;
Console.WriteLine(d);
Console.ReadKey();
}
Am I misunderstanding double?
You are misunderstanding integer math.
(that you assign the value to a double is not relevant. The calculation results in an Integer).
To fix it, use: