string []names=new string[5];
names[0]="关羽";
names[1]="张飞";
names[2]="赵云";
names[3]="马超";
names[4]="黄忠";
for(int i=0;i<names.Length;i++){
Console.WriteLine(names[i]+"");
}
Console.ReadLine();
names[0]="关羽";
names[1]="张飞";
names[2]="赵云";
names[3]="马超";
names[4]="黄忠";
for(int i=0;i<names.Length;i++){
Console.WriteLine(names[i]+"");
}
Console.ReadLine();
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