c#写出乘法口诀

显然是显得无聊五分钟写的乘法口诀

static void Main(string[] args)
        {
            int dq;
            int[] array = new int[] { 1, 2, 3, 4, 5, 6, 7, 8, 9 };
            for (int i = 0; i < array.Length; i++)
            {
                dq = array[i];
                for (int j = 0; j < dq; j++)
                {
                    int a = array[j];
                    int b = array[i];
                    int c = a * b;
                    string s = a + "*" + b + "=" + c + "  ";
                    Console.Write(s);
                }

                Console.WriteLine();
            }
            Console.ReadLine();
        }

效果的话下面图

 

posted @ 2018-12-11 18:04  小阿雄  阅读(607)  评论(0编辑  收藏  举报