C# switch

using System;

namespace Frank
{
	public class Test
	{
		public static void Main(string[] args)
		{
			string input = System.Console.ReadLine();
			switch(input)
			{
				case "1":
					System.Console.WriteLine("用户输入1");
					break;
				default:
					System.Console.WriteLine("输入火星文!");
					break;
			}
		}
	}
}

  

posted on 2013-11-07 22:05  wp456  阅读(165)  评论(0)    收藏  举报

导航