首页 > 代码库 > swith case

swith case

//switch case

int i=int.Parse(Console.ReadLine());

switch(i)

{

case 1:

console.WriteLine("星期一");

break;

 

case 2:

 

console.WriteLine("星期二");

 

break;

 

case 3:

 

console.WriteLine("星期三");

 

break;

 

 

case 4:

 

console.WriteLine("星期四");

 

break;

 

case 5:

 

console.WriteLine("星期五");

 

break;

default:

console.WriteLine("你输入的可能不正确");

break;

swith case