明白了。
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
太粗心了,小錯(cuò)誤不斷:
1..數(shù)組聲明完忘寫“;”
2.for錯(cuò)寫成foreach
3.i忘記聲明int
4.for循環(huán)內(nèi)應(yīng)用“;”隔開而不是“,”
5.Console.Write首字母大寫
6.忘記}對(duì)應(yīng)
1..數(shù)組聲明完忘寫“;”
2.for錯(cuò)寫成foreach
3.i忘記聲明int
4.for循環(huán)內(nèi)應(yīng)用“;”隔開而不是“,”
5.Console.Write首字母大寫
6.忘記}對(duì)應(yīng)
2020-10-06
同學(xué)們注意審題兩個(gè)數(shù)組
string[] name = new string[] {"吳松","錢東宇","伏晨","陳陸","周蕊","林日鵬","何昆","關(guān)欣"};
int[] score = new int[] { 89,90,98,56,60,91,93,85 };
int max = 0;
string ws= "";
for (int a=0;a<= 7;a++)
{
if (max<score[a])
{
max =score[a];
ws =name[a];
}
}
Console.Write("分?jǐn)?shù)最高的是{0},分?jǐn)?shù)是{1},", ws,max);
string[] name = new string[] {"吳松","錢東宇","伏晨","陳陸","周蕊","林日鵬","何昆","關(guān)欣"};
int[] score = new int[] { 89,90,98,56,60,91,93,85 };
int max = 0;
string ws= "";
for (int a=0;a<= 7;a++)
{
if (max<score[a])
{
max =score[a];
ws =name[a];
}
}
Console.Write("分?jǐn)?shù)最高的是{0},分?jǐn)?shù)是{1},", ws,max);
2020-09-10
string str=Console.ReadLine();
int y=Convert.TonInt32(str);
if(y<6 || y>60)
Console.WriteLine("請(qǐng)坐愛心座"):
else
Console.WriteLine("請(qǐng)堅(jiān)持一下"):
int y=Convert.TonInt32(str);
if(y<6 || y>60)
Console.WriteLine("請(qǐng)坐愛心座"):
else
Console.WriteLine("請(qǐng)堅(jiān)持一下"):
2020-09-07
int max = 0;
string[] name = new string[]{};
int[] grade = new int[]{};
for(int i=0;i< grade.Length; i++)
{
if(grade[max]<grade[i]){
max = i;
}
Console.Write("分?jǐn)?shù)最高的是{0},分?jǐn)?shù)是{1}",name[max],grade[max]);
string[] name = new string[]{};
int[] grade = new int[]{};
for(int i=0;i< grade.Length; i++)
{
if(grade[max]<grade[i]){
max = i;
}
Console.Write("分?jǐn)?shù)最高的是{0},分?jǐn)?shù)是{1}",name[max],grade[max]);
2020-09-03
string text = ((year % 4 == 0 && year % 100 != 0) || (year % 400 == 0)) ? "閏年" : "平年";
2020-08-17