0

Hi,

I have made an application for rounding off any number to nearest tens,hundreds or thousands....

But for some values my code is giving wrong answer...

Like , if i want to solve "25*89" ,in that rounding off 25 to nearest tens , the answer should be 30 (according to books) , but my code is giving answer as 20...........

```
private void button2_Click(object sender, EventArgs e)
{
a = this.textBox1.Text;
b = this.textBox2.Text;
c = this.textBox3.Text;
i = Convert.ToInt32(a);
j= Convert.ToInt32(b);
k= Convert.ToDouble(c);
d1 =Math.Round(i / k) * k;
d2 =Math.Round(j / k) * k;
}
```

How can i do this?