string[] names = new string[]{"吳松","錢東宇","伏晨","陳陸","周蕊","林日鵬","何昆","關欣"};
int[] scores = {89,90,98,56,60,91,93,85};
int max = 0;
string name = "";
for(int i=0;i<scores.Length;i++){
if(scores[i]>max){
max = scores[i];
name = names[i];
}
}
Console.Write("分數最高的是{0},分數是{1}",name, max);
int[] scores = {89,90,98,56,60,91,93,85};
int max = 0;
string name = "";
for(int i=0;i<scores.Length;i++){
if(scores[i]>max){
max = scores[i];
name = names[i];
}
}
Console.Write("分數最高的是{0},分數是{1}",name, max);
string[] job = new String[4];
job[0] = "經理";
job[1] = "項目主管";
job[2] = "技術總監";
job[3] = "財務主管";
for (int i = 0; i < 4 ; i++)
{
Console.Write(job[i]);//打印職位
}
job[0] = "經理";
job[1] = "項目主管";
job[2] = "技術總監";
job[3] = "財務主管";
for (int i = 0; i < 4 ; i++)
{
Console.Write(job[i]);//打印職位
}
2017-10-14
string[] name = {"吳松","錢東宇","伏晨","陳陸","周蕊","林日鵬","何昆","關欣"};
int[] score = {89,90,98,56,60,91,93,85};
int max=0;
for(int i=0;i<score.Length;i++)
{
if(score[i]>score[max])
max=i;
}
Console.Write("分數最高的是{0},分數是{1}",name[max],score[max]);
int[] score = {89,90,98,56,60,91,93,85};
int max=0;
for(int i=0;i<score.Length;i++)
{
if(score[i]>score[max])
max=i;
}
Console.Write("分數最高的是{0},分數是{1}",name[max],score[max]);
namespace Test
{
class bra
{
static void Main(string[] args)
{
int A = 1;int B = 2;int C = 3;
int D = 4;int E = 5;int F = 6;
int cup = C;
if (cup >= D)
Console.WriteLine("菇涼請留下電話,謝謝。");
else
Console.WriteLine("對不起,當我知道你還沒D罩杯的時候,我們就已經無緣了。");
}
}
}
{
class bra
{
static void Main(string[] args)
{
int A = 1;int B = 2;int C = 3;
int D = 4;int E = 5;int F = 6;
int cup = C;
if (cup >= D)
Console.WriteLine("菇涼請留下電話,謝謝。");
else
Console.WriteLine("對不起,當我知道你還沒D罩杯的時候,我們就已經無緣了。");
}
}
}
2017-10-12
for (int y = 1; y <= 7; y++)
{
for (int x = 1; x <= 7; x++)
{
if(x==y || x==8-y)
Console.Write("O");
else Console.Write(".");
}
Console.WriteLine();
{
for (int x = 1; x <= 7; x++)
{
if(x==y || x==8-y)
Console.Write("O");
else Console.Write(".");
}
Console.WriteLine();
for (int y = 1; y <= 7; y++)
{
for (int x = 1; x <= y; x++)
{
for (int x = 1; x <= y; x++)
2017-10-12
WriteLine(true | false);//輸出True
Console.WriteLine(true ^false);//輸出False
Console.WriteLine(!false);//輸出True
就是不喜歡他的標準答案
Console.WriteLine(true ^false);//輸出False
Console.WriteLine(!false);//輸出True
就是不喜歡他的標準答案
2017-10-11
只要 Console.Write(6);
Console.Write(6);
Console.Write(6);
拿去拿去一樣行
Console.Write(6);
Console.Write(6);
拿去拿去一樣行
2017-10-11