首页  >  文章  >  微信小程序  >  [C#小程序]命令行小程序之小九九乘法表的实现代码

[C#小程序]命令行小程序之小九九乘法表的实现代码

高洛峰
高洛峰原创
2017-03-24 13:05:501810浏览

用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#小程序]命令行小程序之小九九乘法表的实现代码

以上是[C#小程序]命令行小程序之小九九乘法表的实现代码的详细内容。更多信息请关注PHP中文网其他相关文章!

声明:
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn