{
class Program
{
static void Main(string[] args)
{
監","財務主管"
string[] job ={"經理","項目主管","技術總監","財務主管"};
for (int i = 0; i <job.length ; i++)
{
Console.Write(job[i]);//打印職位
}
}
}
}
哪里錯了,MD
class Program
{
static void Main(string[] args)
{
監","財務主管"
string[] job ={"經理","項目主管","技術總監","財務主管"};
for (int i = 0; i <job.length ; i++)
{
Console.Write(job[i]);//打印職位
}
}
}
}
哪里錯了,MD
2019-11-08
int[] score = new int[] {89,39,100,51,94,65,70 };//分數
Console.Write("不及格的有:");
for (int i = 0; i <score.Length; i++)
{
if(score[i]<60)//篩選條件
Console.Write(score[i]+",");
}
Console.Write("不及格的有:");
for (int i = 0; i <score.Length; i++)
{
if(score[i]<60)//篩選條件
Console.Write(score[i]+",");
}
2019-10-25
static void Main(string[] args)
{
for (int x=0;x<=12;x++)//請填寫代碼
{
Console.WriteLine(x+" ");
}
}
{
for (int x=0;x<=12;x++)//請填寫代碼
{
Console.WriteLine(x+" ");
}
}
2019-10-24
if(money<10000.00)
Console.WriteLine("沒有禮品");
else if(money<50000.00)
Console.WriteLine("送一袋大米");
else if(money<100000.00)
Console.WriteLine("送一套茶具");
else
Console.WriteLine("送一臺微波爐");
Console.WriteLine("沒有禮品");
else if(money<50000.00)
Console.WriteLine("送一袋大米");
else if(money<100000.00)
Console.WriteLine("送一套茶具");
else
Console.WriteLine("送一臺微波爐");
同學筆記中的“一縷火光焚燎原”明顯是錯誤的代碼,為什么還有那么多人點贊。
double x, y;
x = y = 2;//從右向左賦值,x、y的值都是2
x /= 0.5;
y *= 2;
Console.WriteLine(x-y);
這代碼輸出的是0,不是4!
double x, y;
x = y = 2;//從右向左賦值,x、y的值都是2
x /= 0.5;
y *= 2;
Console.WriteLine(x-y);
這代碼輸出的是0,不是4!
2019-10-16
for(int y=1;y<=7;y++){
for(int x=1;x<=7;x++){
if(x==y||x+y==8){
Console.Write("o");
}else{
Console.Write(".");
}
}
Console.WriteLine(" ");
}
for(int x=1;x<=7;x++){
if(x==y||x+y==8){
Console.Write("o");
}else{
Console.Write(".");
}
}
Console.WriteLine(" ");
}