幫忙看看哪里錯了,查了很久了?
using System;
using System.Collections.Generic;
using System.Text;
namespace Test
{
??? class Program
??? {
??????? static void Main(string[] args)
??????? {
??????????? string job = "科員";
??????????? if (job == "局長")
??????????? {
??????????????? Console.WriteLine("發(fā)雙黃月餅");
??????????? }
??????????? else if (job == "處長")
??????????? {
??????????????? Console.WriteLine("發(fā)蛋黃月餅");
??????????? }
??????????? else if(job =="科長")
??????????? {
??????????????? Console.WriteLine("發(fā)棗泥月餅");
??????????? }
??????????? else
??????????? {
??????????????? Console.WriteLine("發(fā)五仁月餅");
??????????? }
??????? }
??? }
}
2023-05-10
好像是對的,看看運行報錯的地方,可能是標點的中文字符。
我的運行成功了
2022-04-21
沒有聲明數(shù)組