using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;namespace chenjiduibi
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("请输入一个分数: ");
int fenshu =Convert.ToInt32(Console.ReadLine())
switch(fenshu/10)
{
case 10:
case 9:
Console.WriteLine("你的成绩等级为: A");
case 8:
Console.WriteLine("你的成绩等级为:B");
case 7:
Console.WriteLine("你的成绩等级为:C");
case 6:
Console.WriteLine("你的成绩等级为:D");
case 5:
Console.WriteLine("你的成绩等级为:E");
case 4:
Console.WriteLine("你输入的成绩有误!!");
break;
} }
}
}
using System.Collections.Generic;
using System.Linq;
using System.Text;namespace chenjiduibi
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("请输入一个分数: ");
int fenshu =Convert.ToInt32(Console.ReadLine())
switch(fenshu/10)
{
case 10:
case 9:
Console.WriteLine("你的成绩等级为: A");
case 8:
Console.WriteLine("你的成绩等级为:B");
case 7:
Console.WriteLine("你的成绩等级为:C");
case 6:
Console.WriteLine("你的成绩等级为:D");
case 5:
Console.WriteLine("你的成绩等级为:E");
case 4:
Console.WriteLine("你输入的成绩有误!!");
break;
} }
}
}
解决方案 »
- 已有打开的与此命令相关联的 DataReader,必须首先将它关闭
- 怎么判断当前日期所在月份是否在表中存在
- 有没有替代 MSDN(for VS2003) 的帮助文件和下载地址?
- ####高手麻烦来看下!! 关于datagrid 记录的控制。
- 各位专家:如何判断当前是否连接着INTERNET网
- 新建windows窗体应用程序的时候,弹出未能加载程序集Microsoft.Buid.Engine
- 有个textBox用于输入日期,但个别情况下不用输入到数据库。怎样写sql语句?
- 串口问题
- 大家写的程序都是在那种分辨率下开发的?
- 各位阿哥,关于24点算法的问题:给出四个数字(3,3,8,8或其他),怎么编程得出24这个数字?能给我源程序看看么?
- 求解关于解析动态生成的dom元素的方法
- 我是新来的。请问大侠C下面的程序是用了匿名方法吗?究竟匿名方法是怎么的一回事啊?
看MSDN上的http://msdn.microsoft.com/zh-cn/library/06tc147t.aspx
就是下面 的了
case a:
case b:
case c:
case d:
dosomething;
break;