美文网首页
第五节课第一个作业

第五节课第一个作业

作者: 流影随风 | 来源:发表于2018-11-01 08:39 被阅读0次

#编码

            Console.WriteLine("输入a");

            string str_a = Console.ReadLine();    //输入

            int a = Convert.ToInt32(str_a);    //类型转换

            Console.WriteLine("输入b");

            string str_b = Console.ReadLine();

            int b = Convert.ToInt32(str_b);

            bool c = b % a == 0 || a + b > 100;    //判断

            if (c)

            {

                Console.WriteLine(a);

            }

            else

            {

                Console.WriteLine(b);

            }

            Console.ReadKey();

#效果

相关文章

网友评论

      本文标题:第五节课第一个作业

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