[C#小程序]命令行小程序之 小九九乘法表

2023-06-13,

用C#写一个小九九乘法

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleManyHellos
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine("打印小九九乘法表");
            int i, j;            
            for (i = 1; i <= 9; i++)
            {
                for (j=1; j<=i; j++)
                {
                    Console.Write("{0} * {1} = {2}\t", i, j, i * j);
                }
                Console.WriteLine();
            }
        }
    }
}

《[C#小程序]命令行小程序之 小九九乘法表.doc》

下载本文的Word格式文档,以方便收藏与打印。