码迷,mamicode.com
首页 > 其他好文 > 详细

随机成绩查询

时间:2016-04-17 11:46:13      阅读:143      评论:0      收藏:0      [点我收藏+]

标签:


            int  fenshu;
            string zuoye;
            Console.WriteLine("输入成绩:");
      
            fenshu =  Convert .ToInt32 ( Console.ReadLine());

            if (fenshu <60)
            {
                Console.WriteLine("是否认真做作业,(是,否)");
                zuoye = Console.ReadLine();
                if (zuoye=="是" )
                {
                    fenshu = fenshu + 5;
                    if (fenshu >= 60)
                    {
                        Console.WriteLine("勉强及格");
                    }
                }
                    else
                    {
                        Console.WriteLine("不及格");
                    }
               
            }
            else
            {
                Console.WriteLine("恭喜你,及格了。");
            }
            Console.WriteLine("结束");

随机成绩查询

标签:

原文地址:http://www.cnblogs.com/qz1234/p/5400528.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!