using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace test1
{
    public partial class _Default : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            string[] NumChineseCharacter = new string[] { "", "", "", "", "", "", "", "", "", "" };
            for (double i = 1; i < 10; i++)
            {
                for (double j = 1; j <= i; j++)
                {
                    double k;
                    k = i * j;
                    if (k < 10)
                    {
                        Response.Write(NumChineseCharacter[(int)j] + NumChineseCharacter[(int)i] + "" + NumChineseCharacter[(int)k] + "&nbsp");
                    }
                    else
                    {
                        string k1,k2;
                        k1 = k.ToString();
                        k2=k.ToString();
                        k1=k1.ToString().Substring(0, 1); //取计算结果中第一个字符
                        k2 = k2.ToString().Substring(1, 1); //取计算结果中第二个字符
                        Response.Write(NumChineseCharacter[(int)j] + NumChineseCharacter[(int)i] + NumChineseCharacter[Convert.ToUInt32(k1)] + "" + NumChineseCharacter[Convert.ToUInt32(k2)] + "&nbsp");
                    }
                }
                Response.Write("<br>");
            }
        }
    }
}

相关文章:

  • 2021-11-19
  • 2021-06-05
  • 2021-06-24
  • 2021-09-08
  • 2022-12-23
猜你喜欢
  • 2021-09-21
  • 2021-11-10
  • 2021-07-07
  • 2022-01-13
  • 2022-12-23
  • 2021-12-12
  • 2021-12-07
相关资源
相似解决方案