//吳松89 錢東宇90 伏晨98 陳陸56 周蕊60 林日鵬91 何昆93 關欣85
//聲明兩個數組,下標姓名分數相對應
string[] name = new string[] { "吳松", "錢東宇", "伏晨", "陳陸", "周蕊", "林日鵬", "何昆", "關欣" };
int[] score = new int[] { 89,90,98,56,60,81,83,85};
int max = 0;//用來存儲最高分
int y = 0; //用來記錄下標
//聲明兩個數組,下標姓名分數相對應
string[] name = new string[] { "吳松", "錢東宇", "伏晨", "陳陸", "周蕊", "林日鵬", "何昆", "關欣" };
int[] score = new int[] { 89,90,98,56,60,81,83,85};
int max = 0;//用來存儲最高分
int y = 0; //用來記錄下標
string boy = "秀麗";//男孩名字
string girl = "偉強";//女孩名字
string temp;
temp = boy;
//把男孩的名字賦值給temp
boy = girl;
//把女孩的名字賦值給男孩
girl = temp;
//把temp中的名字賦值給女孩
Console.WriteLine("男孩叫"+boy+" 女孩叫"+girl);
string girl = "偉強";//女孩名字
string temp;
temp = boy;
//把男孩的名字賦值給temp
boy = girl;
//把女孩的名字賦值給男孩
girl = temp;
//把temp中的名字賦值給女孩
Console.WriteLine("男孩叫"+boy+" 女孩叫"+girl);
2018-01-13
for (int y = 1; y <= 7; y++)
{
for (int x = 1; x <= 7; x++)
{
Console.Write(x);
if(x==y)
{break;}
}
Console.WriteLine();//換行
}
為什么非要雙等號guaobudong搞不懂
{
for (int x = 1; x <= 7; x++)
{
Console.Write(x);
if(x==y)
{break;}
}
Console.WriteLine();//換行
}
為什么非要雙等號guaobudong搞不懂
2018-01-13