Question about double

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?

by vroomvsr via /r/csharp

Leave a Reply