zoukankan      html  css  js  c++  java
  • switch case

    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    
    namespace ConsoleApplication1
    {
        class Program
        {
            static void Main(string[] args)
            {
               Console.Write("请输入数字0—6");
                int a = int.Parse(Console.ReadLine());
                switch (a)
                {
                    case 0:
                        Console.WriteLine("星期天");
                        break;
                    case 1:
                        Console.WriteLine("星期1");
                        break;
                    case 2:
                        Console.WriteLine("星期2");
                        break;
                    case 3:
                        Console.WriteLine("星期3");
                        break;
                    case 4:
                        Console.WriteLine("星期4");
                        break;
                    case 5:
                        Console.WriteLine("星期5");
                        break;
                    case 6:
                        Console.WriteLine("星期6");
                        break;
                    default:
                        Console.WriteLine("数字不正确");
                        break;
    
    
                }
                Console.ReadLine();
            }
        }
    }
  • 相关阅读:
    导航守卫
    asnyc
    扩展运算符 ···
    模版字符串
    iterator迭代器
    箭头函数
    解构
    变量let const
    vueUI可视化
    python图像特征提取
  • 原文地址:https://www.cnblogs.com/qixinjian/p/4586034.html
Copyright © 2011-2022 走看看