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

C#开发轻松入门

难度入门
时长 4小时43分
学习人数
综合评分9.40
833人评价 查看评价
9.5 内容实用
9.5 简洁易懂
9.2 逻辑清晰
for (int i = 0; i < tx.GetLongLength(0); i++) {
int score = int.Parse(tx[i, 1]);
if (max < score) { max = score; j++; }
}
Console.WriteLine("分数最高的是{0},分数是{1}", tx[j, 0], max);
string[,] tx = { { "吴松", "89" }, { "钱东宇", "90" }, { "伏晨", "98" }, { "陈陆", "56" }, { "周蕊", "60" }, { "林日鹏", "91" }, { "何昆", "93" }, { "关欣", "85" } };
int max = 0;
int j = -1;
for (int x = 1;x <= 6;x++ )//请填写for循环结构
{
Console.WriteLine("Yeah!");
}
int y = 5;
while (y >=1)//请输入
{
Console.Write(y+" ");
y--;//请输入
}
这个小哥哥讲课很有意思哟
简单整理了一下,应该是比较简单的写法了。
//请完善代码
for(int x=1;x<8;x++)
{
for (int y=1;y<8;y++)
{
string str=x==y||x+y==8?"O":".";
Console.Write(str);

}
Console.WriteLine();
}
这道题也太变态了吧,对新手很不友好啊!蓝瘦香菇!
int y = 5;
while (y<=5&&y>0)//请输入
{
Console.Write(y+" ");
--y;//请输入
}
foreach用法和Python的for循环遍历数组很像
string[] names=new string[]{"吴松","钱东宇","伏晨","陈陆","周蕊","林日鹏","何昆","关欣"};
int[] score=new int[]{89,90,98,56,60,91,93,85};
int temp=0,max=score[0];
for(int i=1;i<score.Length;i++)
if(max<score[i])
{max=score[i];temp=i;}
Console.Write("分数最高的是{0},分数是{1}",names[temp],max);

最新回答 / qq_RR_15
static void Main(string[] args)        {            int[] score={89,90,98,56,60,91,93,85};            string[] name={"吴松","钱东宇","伏晨","陈陆","周蕊","林日鹏","何昆","关欣"};            int N=score[0];//假设第一个分是最高分            for (int i=1; i<score.Length; i++)       ...

最新回答 / 慕前端6461026
将分数定义为double型常量,然后运用运算符(+、-、*、/)进行计算。

已采纳回答 / 睿智狂人
namespace Test{    class Program    {        static void Main(string[] args)        {            for (int y = 1; y <= 7; y++)            {                for (int x = 1; x <= 7; x++)                {                    if(x <= y)                 ...
x决定行的次数
用continue吧

最新回答 / 慕粉4364288
你看下下面打框这里的代码,你的是不是一样的,或者改成while(x>=2&&x<4);这样输出来的结果是2 3 4<...图片...>
课程须知
本课程是C#基础课程,热烈欢迎各位小伙伴拍砖吐槽!!
老师告诉你能学到什么?
1、C#的基本概念 2、Visual Studio的使用技巧 3、C#的语法和程序逻辑

微信扫码,参与3人拼团

微信客服

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

帮助反馈 APP下载

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

公众号

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

友情提示:

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

本次提问将花费2个积分

你的积分不足,无法发表

为什么扣积分?

本次提问将花费2个积分

继续发表请点击 "确定"

为什么扣积分?

举报

0/150
提交
取消