bsp;
25. /// </summary>
26. /// <param name="s1"></param>
27. /// <param name="s2"></param>
28. /// <param name="count"></param>
29. /// <returns></returns>
30. private static string StrMulChar(string s1, char s2, int count)
31. {
32. StringBuilder sb = new StringBuilder();
33. int temp = 0;
34. for (int i = s1.Length - 1; i >= 0; i--)
35. {
36. var s = s1[i].CharToInt() * s2.CharToInt() + temp;
37. temp = 0;
38. while (s >= 10)
39. {
40. temp++;
41. s -= 10;
42. }
43. sb.Insert(0, s);
44. }
45. if (temp > 0)
46. {
47. sb.Insert(0, temp);
48. }
49. sb.Append('0', count);//给结果加0
50. return sb.ToString();
51. }
52. /// <summary>
53. /// 极大数加法
上一页 [1] [2] [3] [4] [5] 下一页