string[] job =new string[4];
job[0]="经理";
job[1]="项目主管";
job[2]="技术总监";
job[3]="财务主管";//声明“职位”数组,初始化为:"经理","项目主管","技术总监","财务主管"
for (int i = 0; i <job.Length; i++)
{ Console.Write(job[i]);//打印职位
}
job[0]="经理";
job[1]="项目主管";
job[2]="技术总监";
job[3]="财务主管";//声明“职位”数组,初始化为:"经理","项目主管","技术总监","财务主管"
for (int i = 0; i <job.Length; i++)
{ Console.Write(job[i]);//打印职位
}
2016-09-02
for(int x=1;x<=5;x++)
{
if(x%2==0)
continue;//添加关键字break或continue
Console.Write(x);
}
{
if(x%2==0)
continue;//添加关键字break或continue
Console.Write(x);
}
2016-09-02
for (int x = 1; x < 10; x++)
{
if(x==3||x==8)
continue;//请添加代码,过滤3和8
Console.Write(x);
}
{
if(x==3||x==8)
continue;//请添加代码,过滤3和8
Console.Write(x);
}
2016-09-02
for (int x=1;x<=12 ;x++ )//请填写代码
{
Console.WriteLine(x+" ");
}
}
{
Console.WriteLine(x+" ");
}
}
2016-09-02
最赞回答 / 漂浮的Cloud
x+“ ”是因为在x输出的后面加一个空格。在循环中,用Console.Write(x+“ ”);输出的是x x x x x;而Console.Write(x)输出是xxxxx;总的说来区别就是在没个x间加一个空格
2016-09-01
int year = 2015;//年份
string text;
text=year%4==0?"闰年":"平年";
//请填写代码
Console.WriteLine("今年是{0}",text);
这个是正确的,已验证
string text;
text=year%4==0?"闰年":"平年";
//请填写代码
Console.WriteLine("今年是{0}",text);
这个是正确的,已验证
2016-08-31
static void Main(string[] args)
{
int year = 2015;//年份
string text;
text=year%=4?"闰年":"平年";
//请填写代码
Console.WriteLine("今年是{0}",text);
{
int year = 2015;//年份
string text;
text=year%=4?"闰年":"平年";
//请填写代码
Console.WriteLine("今年是{0}",text);
2016-08-31