最贊回答 / 慕斯卡3158314
namespace Test{? ? class Program? ? {? ? ? ? static void Main(string[] args)? ? ? ? {? ? ? ? ? ? string boy = "秀麗";//男孩名字? ? ? ? ? ? string girl = "偉強(qiáng)";//女孩名字? ? ? ? ? ? string temp;//中間變量? ? ? ? ? ? temp="秀麗";//把男孩的名字賦值給temp? ? ? ? ? ?boy=girl; //把女孩的名字賦...
2018-06-26
已采納回答 / LeahDizon
你這個(gè)步驟有一些是多余的。。。而且思路好像錯(cuò)了。。我把主要代碼告訴你吧。for(i=0;i<b.Length;i++){????sum+=b[i];}avge=sum/b.Length;Console.WriteLine("平均分是"+avge+","+"高于平均分的有");for(i=0;i<b.Length;i++){????if(b[i]>avge){????????Console.Write(a[i]+" ");????}}
2018-06-14
最贊回答 / 慕粉9455790
string[,] info = new string[8, 2] { { "吳松", "89" }, { "錢東宇", "90" }, { "伏晨", "98" }, { "陳陸", "56" }, { "周蕊", "60" }, { "林日鵬", "9" }, { "何昆", "93" }, { "關(guān)欣", "85" } };? ? ? ? ? ? int temp=0;? ? ? ? ? ? for(int i=0;i<info.GetLongLength(0);i++)? ? ? ? ? ?...
2018-06-12
已采納回答 / qq_Steming星靈_0
Console.Writeline(num[i]+","); ? ? => ? ? Console.WriteLine(); ? 還可以在for循環(huán)外面加個(gè)Console.ReadLine();
2018-06-06
已采納回答 / 慕粉133046788
int長(zhǎng)度數(shù)據(jù)類型有:byte(8bits)、short(16bits)、int(32bits)、long(64bits)
2018-05-25
已采納回答 / 慕仔0944135
a<=i是不是有問題,假如i=2,那么第一次循環(huán)a=2,a%a為 2%2=0,且a!=1,自己處以自己怎么能算非素?cái)?shù)呢,所以我覺得應(yīng)該a<i,還有一點(diǎn),這個(gè)有個(gè)數(shù)學(xué)問題,a<Math.Ceiling(Math.Sqrt(i))這樣能減少運(yùn)算次數(shù),一般都是開根號(hào)來算,我也沒找到證明,你就自己查Prime函數(shù),都是這么寫
2018-05-21