亲测,在整数相除,结果仅保留整数部分这一点上,python、c、java、c++语言和C#一样的,PHP是弱类型语言,PHP会输出0.5而非0;
强类型语言,整数除整数,结果还是整数,而弱类型语言和它们不一样。
不知道评论下面为什么会有人说C#规范者有毛病 ←_←
强类型语言,整数除整数,结果还是整数,而弱类型语言和它们不一样。
不知道评论下面为什么会有人说C#规范者有毛病 ←_←
2018-04-07
string topName; int topScore = 0;
Dictionary<string,int> l = new Dictionary<string,int>();
l.Add("吴松",89);l.Add("钱东宇",90);//后面的几个人忽略了不然太长
foreach(KeyValuePair<string, int> kv in l)
if(kv.Value>topScore){ topName = kv.Key; topScore = kv.Value; }
Console.WriteLine("分数最高的是{0},分数是{1}",topName,topScore);
Dictionary<string,int> l = new Dictionary<string,int>();
l.Add("吴松",89);l.Add("钱东宇",90);//后面的几个人忽略了不然太长
foreach(KeyValuePair<string, int> kv in l)
if(kv.Value>topScore){ topName = kv.Key; topScore = kv.Value; }
Console.WriteLine("分数最高的是{0},分数是{1}",topName,topScore);
string[,] examInfo = new string[8,2]{{"吴松","89"},{"钱东宇","90"},{"伏晨","98"},{"陈陆","56"},{"周蕊","60"},{"林日鹏","91"},{"何晶","93"},{"关欣","85"}};
int score = 0;
string name = "";
for(int i = 0; i < examInfo.GetLongLength(0); i++)
{
int score = 0;
string name = "";
for(int i = 0; i < examInfo.GetLongLength(0); i++)
{
string[,] examInfo = new string[8,2]{{"吴松","89"},{"钱东宇","90"},{"伏晨","98"},{"陈陆","56"},{"周蕊","60"},{"林日鹏","91"},{"何晶","93"},{"关欣","85"}};
学完这个课程,感觉可能是网页的原因吧,感觉答案挺死板的。而且出题的人特别爱玩Console.Write和Console.WriteLine这个梗
2018-03-31
string[,] tx = { { "吴松", "89" }, { "钱东宇", "90" }, { "伏晨", "98" }, { "陈陆", "56" }, { "周蕊", "60" }, { "林日鹏", "91" }, { "何昆", "93" }, { "关欣", "85" } };
int max = 0;
int j = -1;
int max = 0;
int j = -1;
for (int x = 1;x <= 6;x++ )//请填写for循环结构
{
Console.WriteLine("Yeah!");
}
{
Console.WriteLine("Yeah!");
}