最新回答 / darkstars
? ? ? ? ? ? string[] name = new string[] { "景珍", "林惠洋","程蓉", "洪南昌", "龍玉明", "單江開(kāi)", "田武開(kāi)", "王三明" };? ? ? ? ? ? int[] sum = new int[] { 90, 65, 88, 70, 46, 81, 100, 68 };? ? ? ? ? ? Console.Write("平均分是76高于平均分的有:");? ? ? ? ? ? for (int i = 0; i < sum.Lengt...
2020-11-16
最新回答 / darkstars
? ? ? ? ? ? string[] name = new string[] { "景珍", "林惠洋","成蓉", "洪南昌", "龍玉明", "單江開(kāi)", "田武山", "王三明" };? ? ? ? ? ? int[] sum = new int[] { 90, 65, 88, 70, 46, 81, 100, 68 };? ? ? ? ? ? Console.Write("平均分是76,高于平均分的有:");? ? ? ? ? ? for (int i = 0; i < sum.Leng...
2020-11-04
//請(qǐng)完善代碼,判斷數(shù)組中有沒(méi)有7的整倍數(shù)
bool hasSeven = false;
foreach (int temp in num) {
hasSeven = temp % 7 == 0 ? true : false ;
if(hasSeven)
break;
}
Console.Write(hasSeven ? "有7的整倍數(shù)" : "沒(méi)有7的整倍數(shù)");
bool hasSeven = false;
foreach (int temp in num) {
hasSeven = temp % 7 == 0 ? true : false ;
if(hasSeven)
break;
}
Console.Write(hasSeven ? "有7的整倍數(shù)" : "沒(méi)有7的整倍數(shù)");
2020-11-04
直接改成Console.WriteLine(true);也行...系統(tǒng)只檢查最后輸出內(nèi)容,不管中間過(guò)程合理不合理
2020-11-02
明白了。
1. bool a = ++x * x > 3;
bool b = a;
2. bool a = ++x * x > 3;
bool b = ++x * x > 3;
1. bool a = ++x * x > 3;
bool b = a;
2. bool a = ++x * x > 3;
bool b = ++x * x > 3;
2020-10-30
已采納回答 / KulooM
第二張圖score[i]=s的意思是把 s 的值賦給 score[i],所以無(wú)論怎么循環(huán),s 的值是沒(méi)有變化的,一直是你開(kāi)始定義的int s = score[0],也就是第一個(gè)數(shù),89
2020-10-26