美文网首页
第9次作业

第9次作业

作者: 头有点铁的愣头青 | 来源:发表于2018-11-21 14:49 被阅读0次

代码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();

相关文章

网友评论

      本文标题:第9次作业

      本文链接:https://www.haomeiwen.com/subject/mbkcqqtx.html