I can\'t get this to divide into a decimal. It is rounding to value 0.
private void button24_Click(object sender, EventArgs e) { double x = 0;
It's integer division and those are the expected outputs.
double x = 1.0 / 5; // this will not perform integer division double x = 1/5; // this does (1/5 = 0). double x = 1D / 5; // this will not because 1 is treated as a double