代码int mun = 0;
Console.WriteLine("请输入一个数字");
string str_mun = Console.ReadLine();
try
{
mun = Convert.ToInt32(str_mun);
}
catch
{
Console.WriteLine("你输入有错误");
}
for (int i = 0; i <= mun; i++)
{
Console.WriteLine("{0}+{1}={2}",i,mun-i,mun);
}
Console.ReadKey();