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

C#开发轻松入门

难度入门
时长 4小时43分
学习人数
综合评分9.40
833人评价 查看评价
9.5 内容实用
9.5 简洁易懂
9.2 逻辑清晰
static void Main(string[] args)
{
int y=5;
while(y<10)
{
y++;
}
while(y>=1)
{
Console.Write(y+" ");

y--;
}
没有什么是用中文音译不了的。
int x = 5;
int y = 5;
int z = 5;
++x;
Console.Write(x);
Console.Write(++y);
Console.Write(++z);
把x++改成++x,把y++改成++y,就可以了
因为:比如给x赋值,
a = x++;a = x;x = x+1;
a = ++x;x = x+1;a = x;
///是文档注释,只能写在类、方法、属性的前面。不能用来注释单个变量。
我会告诉你,填了条件就发一种五仁月饼,不填还可以发枣泥月饼和五仁月饼两种么?
这个不行啊!这个就直接是判断了个男的,女的那个都跳过了。这个只是男的结果,女的达到了,并没有输出结果来!
string[,] score = new string[2,8]{{"吴松","钱东宇","伏晨","陈陆","周蕊","林日鹏","何昆","关欣"},{"89","90","98","56","60","91","93","85"}};
string x = "0";
int y =0;
for (int i =0; i<8; i++) {
if (int.Parse(x) < int.Parse(score[1,i])) {
x = score[1,i];
y=i;
}
}
Console.Write("分数最高的是{0},分数是{1}", 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("分数最高的是");
foreach(var student in hightestScoreStudents)
{
Console.WriteLine("{0},分数是{1}", student.Name, student.Score);
}
}
}
public static void TheHightestScoreStudent(List<Student> students)
{
var hightestScoreStudents = from student in students
where student.Score ==students.Max(x => x.Score)
select student;
new Student("陈陆",56),
new Student("周蕊",60),
new Student("林日鹏",91),
new Student("何昆",93),
new Student("关欣",85)
};
TheHightestScoreStudent(students);
}
namespace projGetMaxScore
{
class Program
{
static void Main(string[] args)
{
List<Student> students = new List<Student>{
new Student("吴松",89),
new Student("钱冬宇",90),
new Student("伏晨",98),
using System;
using System.Collections.Generic;
using System.Text;
using System.Linq;
这道题有点出得有点坑!不换行还不行了
感叹号必须在中文状态下,哈哈哈
课程须知
本课程是C#基础课程,热烈欢迎各位小伙伴拍砖吐槽!!
老师告诉你能学到什么?
1、C#的基本概念 2、Visual Studio的使用技巧 3、C#的语法和程序逻辑

微信扫码,参与3人拼团

微信客服

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

帮助反馈 APP下载

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

公众号

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

友情提示:

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

本次提问将花费2个积分

你的积分不足,无法发表

为什么扣积分?

本次提问将花费2个积分

继续发表请点击 "确定"

为什么扣积分?

举报

0/150
提交
取消