請(qǐng)問我哪里出錯(cuò)了?
using System;
using System.Collections.Generic;
using System.Text;
namespace Test
{
? ? class Program
? ? {
? ? ? ? static void Main(string[] args)
? ? ? ? {
? ? ? ? ? ? //聲明“職位”數(shù)組,初始化為:"經(jīng)理","項(xiàng)目主管","技術(shù)總監(jiān)","財(cái)務(wù)主管"
? ? ? ? ? ? string[] job =new string [4]
? ? ? ? ? ? job[0]="經(jīng)理";
? ? ? ? ? ? job[1]="項(xiàng)目主管";
? ? ? ? ? ? job[2]="技術(shù)總監(jiān)";
? ? ? ? ? ? jib[3]="財(cái)務(wù)總管";
? ? ? ? ? ? for (int i = 0; i <job.length; i++)
? ? ? ? ? ? {
? ? ? ? ? ? ? ? Console.Write(job[i]);//打印職位
? ? ? ? ? ? }
? ? ? ? }
? ? }
}
2020-08-10
?string[] job =new string [4]? 后面缺分號(hào) ;
2020-08-10
你的? ? ? job.length 其中的l是小寫的應(yīng)該改成job.Length? ,跟我一樣的問題
2020-07-01
string[] job =new string [4]? 后面應(yīng)該加分號(hào)
jib[3]="財(cái)務(wù)總管";? ? 應(yīng)該是job[3]
for (int i = 0; i <job.length; i++)? ? ?length? ?首字母大寫? Lenght
如果輸出想換行就把Console.Write;換成Console.WriteLine;
2020-04-23
using System;
using System.Collections.Generic;
using System.Text;
namespace Test
{
? ? class Program
? ? {
? ? ? ? static void Main(string[] args)
? ? ? ? {
? ? ? ? ? ? //聲明“職位”數(shù)組,初始化為:"經(jīng)理","項(xiàng)目主管","技術(shù)總監(jiān)","財(cái)務(wù)主管"
? ? ? ? ? ? string[] job = {"經(jīng)理","項(xiàng)目主管","技術(shù)總監(jiān)","財(cái)務(wù)主管"};
? ? ? ? ? ? for (int i = 0; i < job.Length ; i++)
? ? ? ? ? ? {
? ? ? ? ? ? ? ? Console.Write(job[i]);//打印職位
? ? ? ? ? ? }
? ? ? ? }
? ? }
}
沒什么大問題,兩個(gè)小問題
job寫錯(cuò)
job.Length首字母大寫
2020-04-19
","是什么意思?
2020-04-16
Console.Write(job[i]+","); 你沒有加”,“那些職位就連起來了