Chinaunix首页 | 论坛 | 博客
  • 博客访问: 3071963
  • 博文数量: 1412
  • 博客积分: 15478
  • 博客等级: 上将
  • 技术积分: 14938
  • 用 户 组: 普通用户
  • 注册时间: 2007-08-23 16:08
文章存档

2016年(1)

2015年(17)

2013年(13)

2012年(103)

2011年(185)

2010年(261)

2009年(425)

2008年(363)

2007年(44)

分类: 数据库开发技术

2009-06-28 23:15:28

using System;
using System.Collections.Generic;
using System.Text;
namespace _._7练习二用iF_else重试练习
{
    class Program
    {
        static void Main(string[] args)
        {
            string result = Console.ReadLine();
            for (int i = 0; i < 4; i++)
            {
                if (result == "A")
                {
                    Console.WriteLine("A成绩的分数段是80-100");
                }
                else if (result == "B")
                {
                    Console.WriteLine("B成绩的分数段是70-85");
                }
                else if (result == "C")
                {
                    Console.WriteLine("C成绩的分数段是60-70");
                }
                else
                {
                    Console.WriteLine("D成绩的分数段是60以下");
                }
                result = Console.ReadLine();//注意最后赋值
               
            }
        }
    }
}
阅读(714) | 评论(0) | 转发(0) |
0

上一篇:使用case练习

下一篇:28号综合练习

给主人留下些什么吧!~~