i want to divide two numbers and then multiply 20 in result value.
my code is:
mm = Convert.ToInt32(ds.Tables[0].Rows[0][1].ToString());
a = (TextBox)row.FindControl("T1");
m = (float)(Convert.ToInt32(a.Text) / mm) * 20; for example:
a=20, mm=40
so m should be (20/40)*20=10.
but in programming, divide ("/") give 0 when we try 20/40 instead of 0.5. so i always get value of m is 0 except a=40.
how can i do this? i want m=10, not 0.