中文的乘法口诀表(asp.net C#)

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>");
            }
        }
    }
}

你可能感兴趣的:(.net,乘法,C#,asp.net,口诀)