C# for循环输出九九乘法表

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

namespace _1002_for循环输出九九乘法表
{
    class Program
    {
        static void Main(string[] args)
        {
            int i, j, z;
            for (i = 1, j = 1; i <= 1; i++)
            {
                Console.Write("{0}*{1}={2}" + "\t", i, j, z = i * j);
            }
            Console.WriteLine("\n");
            for (i = 1, j = 2; i <= 2; i++)
            {
                Console.Write("{0}*{1}={2}" + "\t", i, j, z = i * j);
            }
            Console.WriteLine("\n");
            for (i = 1, j = 3; i <= 3; i++)
            {
                Console.Write("{0}*{1}={2}" + "\t", i, j, z = i * j);
            }
            Console.WriteLine("\n");
            for (i = 1, j = 4; i <= 4; i++)
            {
                Console.Write("{0}*{1}={2}" + "\t", i, j, z = i * j);
            }
            Console.WriteLine("\n");
            for (i = 1, j = 5; i <= 5; i++)
            {
                Console.Write("{0}*{1}={2}" + "\t", i, j, z = i * j);
            }
            Console.WriteLine("\n");
            for (i = 1, j = 6; i <= 6; i++)
            {
                Console.Write("{0}*{1}={2}" + "\t", i, j, z = i * j);
            }
            Console.WriteLine("\n");
            for (i = 1, j = 7; i <= 7; i++)
            {
                Console.Write("{0}*{1}={2}" + "\t", i, j, z = i * j);
            }
            Console.WriteLine("\n");
            for (i = 1, j = 8; i <= 8; i++)
            {
                Console.Write("{0}*{1}={2}" + "\t", i, j, z = i * j);
            }
            Console.WriteLine("\n");
            for (i = 1, j = 9; i <= 9; i++)
            {
                Console.Write("{0}*{1}={2}" + "\t", i, j, z = i * j);
            }
            Console.WriteLine("\n");
            Console.ReadLine();
        }
    }
}

 

你可能感兴趣的:(C#,后端)