占位符使用(竖式计算)

using System;
namespace program
{
    class program1
    {
        static void Main(string[] args)
        {
            int a = 100;
            int b = 100;
            Console.WriteLine("下面使用竖式计算结果");
            Console.WriteLine("{0,6}
+{1,5}
-------
={2,5}", a, b, a + b);
        }
    }
}

 

原文地址:https://www.cnblogs.com/BruceKing/p/11798974.html