public double bigzarb(double u,double v) { double n; double x=0; double y; double w=0; double z; string[] i = textBox7.Text.Split(','); int[] nums = new int[i.Length]; for (int counter = 0; counter < i.Length; counter++) { nums[counter] = Convert.ToInt32(i[counter]); } u = nums[0]; double firstdigits =Math.Floor(Math.Log10(u) + 1); v = nums[1]; double seconddigits = Math.Floor(Math.Log10(v) + 1); if (firstdigits >= seconddigits) { n = firstdigits; } else { n = seconddigits; } if (u == 0 || v == 0) { MessageBox.Show("the Multiply is 0"); } int intn = Convert.ToInt32(n); if (intn <=3) { double uv = u * v; string struv = uv.ToString(); MessageBox.Show(struv); return uv; } else { int m =Convert.ToInt32(Math.Floor(n / 2)); x = u % Math.Pow(10,m); y = u / Math.Pow(10, m); w = v % Math.Pow(10,m); z = v / Math.Pow(10,m); return bigzarb(x, w) *Math.Pow(10,m)+ (bigzarb(x,w)+bigzarb(w,y))*Math.Pow(10,m) +bigzarb(y,z); ///how can i show the value of the line above in a textbox? } }
double result = bigzarb(x, w) *Math.Pow(10,m)+ (bigzarb(x,w)+bigzarb(w,y))*Math.Pow(10,m) +bigzarb(y,z); textBox1.Text = result.ToString() return result;
textBox1.Text = bigzarb(1.0,2.0)
u
v
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)