首页 > Windows开发 > 详细

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

时间:2017-02-09 17:49:08      阅读:339      评论:0      收藏:0      [点我收藏+]

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

原文:http://12035272.blog.51cto.com/12025272/1896405

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!