C#第九次作业1
2018-11-21 本文已影响0人
亻尔亻也
wan'cheng'yi'xia'yao'q
{
int shuzi = 0;
Console.WriteLine("请输入数字");
shuzi = Convert.ToInt32(Console.ReadLine());
for (int i = 0; i <= shuzi; i++)
{
if (i + (shuzi - i) == shuzi)
{ Console.WriteLine("{0}+{1}={2}", i, shuzi-i, shuzi); }
}
Console.ReadKey();
}