string[] job =new string [4];
job[0]="经理";
job[1]="项目总管";
job[2]="技术总监";
job[3]="财务主管";
for (int i = 0; i <job.Length;i++)
{
Console.WriteLine(job[i]);//打印职位
}
Console.ReadLine();
job[0]="经理";
job[1]="项目总管";
job[2]="技术总监";
job[3]="财务主管";
for (int i = 0; i <job.Length;i++)
{
Console.WriteLine(job[i]);//打印职位
}
Console.ReadLine();
namespace Test{
class Program
{
static void Main(string[] args)
{ int time =7
if(time<8||time>23)
Console.WriteLine("上床“);
else
Console,WriteLine("起床");
}
}
}
class Program
{
static void Main(string[] args)
{ int time =7
if(time<8||time>23)
Console.WriteLine("上床“);
else
Console,WriteLine("起床");
}
}
}
2016-05-19
class Programe{
static void Main(string[] args)
{
Console.WriteLine(ture||false);//输出ture
Console.WriteLine(true&&false);//输出false
Console.WriteLine(!false);//输出ture
}
}
static void Main(string[] args)
{
Console.WriteLine(ture||false);//输出ture
Console.WriteLine(true&&false);//输出false
Console.WriteLine(!false);//输出ture
}
}
2016-05-19
for (int y = 1; y <= 7; y++)
{
for (int x = 1; x<=y; x++)
{
Console.Write(x);
}
Console.WriteLine();//换行
}
Console.ReadLine();这样不就行了。。。。
{
for (int x = 1; x<=y; x++)
{
Console.Write(x);
}
Console.WriteLine();//换行
}
Console.ReadLine();这样不就行了。。。。
2016-05-19
namespace Test
{
class Program
{
static void Main(string[] args)
{
int year = 2015;//年份
string text = year % 4 ==0 ? "闰年" : "平年";//请填写代码
Console.WriteLine("今年是{0}",text);
}
}
}
{
class Program
{
static void Main(string[] args)
{
int year = 2015;//年份
string text = year % 4 ==0 ? "闰年" : "平年";//请填写代码
Console.WriteLine("今年是{0}",text);
}
}
}
2016-05-17
Console.WriteLine(9+"2.2");//输出92.2,因为"2.2"是字符串,所以9也被转换为"9",+起的作用是连接字符串
2016-05-16