char sex='男';//性別 int age = 21;//年齡 char sex1='女'; int age1 = 20; if(age>=22)//請填寫條件
{if (age1 >= 20) {Console.WriteLine("都達到法定婚齡啦");} else {Console.WriteLine("女方沒有達到喲"); } } else {if (age1 >= 20) {Console.WriteLine("男方沒有達到法定婚齡!"); } else { Console.WriteLine("都沒有達到!");} }
{if (age1 >= 20) {Console.WriteLine("都達到法定婚齡啦");} else {Console.WriteLine("女方沒有達到喲"); } } else {if (age1 >= 20) {Console.WriteLine("男方沒有達到法定婚齡!"); } else { Console.WriteLine("都沒有達到!");} }
2018-05-07
string[] name = new string[] { "景珍", "林惠洋", "成蓉", "洪南昌", "龍玉民", "單江開", "田武山", "王三明" };int[] score = new int[] {90,65,88,70,46,81,100,68 }; double avg =score.Average();Console.WriteLine("平均分"+avg+","+ "高于有:"); for (int a = 0; a < score.Length; a++) {if (score[a] >avg){ Console.Write(name[a]+" "); } }
namespace Text {
class Program{
static void Main(spring[] args){ //static 靜態, void 返回值, spring[] 參數 類型為一個字符串數組,args 參數名稱
}
}
}
class Program{
static void Main(spring[] args){ //static 靜態, void 返回值, spring[] 參數 類型為一個字符串數組,args 參數名稱
}
}
}