2018-11-21作业1

using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace ConsoleApplication1 { class Program { static void Main(string[] args) { Console.WriteLine("请输入一个数字"); string str_i = Console.ReadLine(); int i = Convert.ToInt32(str_i); for (int a = 0; a <= i; a++) { Console.WriteLine("{0}+{1}={2}", a, i - a, i); } Console .ReadKey(); } } }

你可能感兴趣的:(2018-11-21作业1)