为了账号安全,请及时绑定邮箱和手机立即绑定

C#开发轻松入门

难度入门
时长 4小时43分
学习人数
综合评分9.40
833人评价 查看评价
9.5 内容实用
9.5 简洁易懂
9.2 逻辑清晰
这个不行啊!这个就直接是判断了个男的,女的那个都跳过了。这个只是男的结果,女的达到了,并没有输出结果来!

最新回答 / qq_落叶废话_0
你这图片什么都看不清楚

最赞回答 / L1Rui_
  for ( int GJ = 0; GJ <= 20; GJ++)            {                for ( int MJ = 0; MJ <=33; MJ++)                {                    for (int XJ = 0; XJ <= 300;XJ++ )                        if (5 * GJ + 3 * MJ + XJ / 3.0 == 100&&GJ+MJ+XJ=...
string[,] score = new string[2,8]{{&quot;吴松&quot;,&quot;钱东宇&quot;,&quot;伏晨&quot;,&quot;陈陆&quot;,&quot;周蕊&quot;,&quot;林日鹏&quot;,&quot;何昆&quot;,&quot;关欣&quot;},{&quot;89&quot;,&quot;90&quot;,&quot;98&quot;,&quot;56&quot;,&quot;60&quot;,&quot;91&quot;,&quot;93&quot;,&quot;85&quot;}};
string x = &quot;0&quot;;
int y =0;
for (int i =0; i&lt;8; i++) {
if (int.Parse(x) &lt; int.Parse(score[1,i])) {
x = score[1,i];
y=i;
}
}
Console.Write(&quot;分数最高的是{0},分数是{1}&quot;, score[0,y],x);
public class Student
{
public Student(string name, int score)
{
Name = name;
Score = score;
}
public string Name { get; set; }
public int Score { get; set; }
}
}
Console.Write(&quot;分数最高的是&quot;);
foreach(var student in hightestScoreStudents)
{
Console.WriteLine(&quot;{0},分数是{1}&quot;, student.Name, student.Score);
}
}
}
public static void TheHightestScoreStudent(List&lt;Student&gt; students)
{
var hightestScoreStudents = from student in students
where student.Score ==students.Max(x =&gt; x.Score)
select student;
new Student(&quot;陈陆&quot;,56),
new Student(&quot;周蕊&quot;,60),
new Student(&quot;林日鹏&quot;,91),
new Student(&quot;何昆&quot;,93),
new Student(&quot;关欣&quot;,85)
};
TheHightestScoreStudent(students);
}
namespace projGetMaxScore
{
class Program
{
static void Main(string[] args)
{
List&lt;Student&gt; students = new List&lt;Student&gt;{
new Student(&quot;吴松&quot;,89),
new Student(&quot;钱冬宇&quot;,90),
new Student(&quot;伏晨&quot;,98),
using System;
using System.Collections.Generic;
using System.Text;
using System.Linq;

最新回答 / 六月猫
上边定义的数组类型是string,类型要一致,否则报错

最新回答 / qq_慕的地6528064
这样     for (int i = 1; i < 100; i++)            {                Console.Write(i+"\t");                if (i%5==0)                {                    Console.WriteLine() ;                }            }
这道题有点出得有点坑!不换行还不行了

已采纳回答 / 慕村631995
基本操作没多大变化的,一样用
感叹号必须在中文状态下,哈哈哈

最新回答 / 粗实而夜雨
我复制了你的代码,重新跑了一遍发现的错误就是你的代码中有几个分号写成了中文的格式,你改下试试using System;using System.Collections.Generic;using System.Text;namespace Test{    class Program    {        static void Main(string[] args)        {            string boy = "秀丽";//男孩名字                        ...
课程须知
本课程是C#基础课程,热烈欢迎各位小伙伴拍砖吐槽!!
老师告诉你能学到什么?
1、C#的基本概念 2、Visual Studio的使用技巧 3、C#的语法和程序逻辑

微信扫码,参与3人拼团

微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号

友情提示:

您好,此课程属于迁移课程,您已购买该课程,无需重复购买,感谢您对慕课网的支持!

本次提问将花费2个积分

你的积分不足,无法发表

为什么扣积分?

本次提问将花费2个积分

继续发表请点击 "确定"

为什么扣积分?

举报

0/150
提交
取消