问答详情
源自:3-6 C#中多重if结构

正确答案哦

using System;

using System.Collections.Generic;

using System.Text;


namespace Test

{

    class Program

    {

        static void Main(string[] args)

        {

            string job = "科长";

            if (job == "局长")

            {

                Console.WriteLine("发双黄月饼");

            }

            else if (job == "处长")

            {

                Console.WriteLine("发蛋黄月饼");

            }

            else  if(job == " 科长  "  )

            {

                Console.WriteLine("发枣泥月饼");

            }

            else  

            {

                Console.WriteLine("发五仁月饼");

            }

        }

    }

}


提问者:qq_千山万水_4 2017-09-27 21:47

个回答

  • baofenny
    2017-09-28 12:12:08

    发枣泥月饼