Q:

Dividing Math with C#

This has a potentially simple answer but I can't figure it out - 
double Result = 1 / 12;

returns 0, while
double Result2 = 24 / 12;

return 2
What's going on and how can I fix it?

A:

Try this:
double Result = 1 / (double)12;

or this:
double Result = 1 / 12D;

In C# (and also in a lot of other languages), integer division returns an integer. By casting one of the operands to double or explicitly declaring a literal double you can force the division expression to return a double and not truncate after the decimal place.

A:

it is doing integer math because the numbers on the right are evaluated as integers. 
try 1.0/12;

