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

C#开发轻松入门

难度入门
时长 4小时43分
学习人数
综合评分9.40
833人评价 查看评价
9.5 内容实用
9.5 简洁易懂
9.2 逻辑清晰
这题有bug,那个WriteLine也对的
为什么我的代码和答案一样并且在vs中是可以的 但是在这却不行!! 这样不通过 我的这门课程就因为这一节而无法完成!!!!!!!
int[] num = new int[] { 3, 34, 42, 2, 11, 19, 30, 55, 20 };
for (int i = 0; i < num.Length; i++)
if (num[i] % 2 == 0)
{
Console.Write(num[i] + ",");
for (i = 0; i < score.Length; i++)
{
if (score[i] > max) //比较元素大小,记录最大元素及其下标
{
max = score[i];
_max = i;
}
}
Console.WriteLine("分数最高的是{0},分数是{1}", name[_max], score[_max]);
string[] name=new string[]{"吴松","钱东宇","伏晨","陈陆","周蕊","林日鹏","何昆","关欣"};
int[] score = new int[] {89,90,98,56,60,91,93,85};
int max = score[0]; // max保存最大元素
int _max = 0; //保存最大元素下标,如果需要记录那个元素最大
int i;

已采纳回答 / 小小1七爷
using System;using System.Collections.Generic;using System.Text;namespace Test{    class Program    {        static void Main(string[] args)        {            for (int x = 1; x < 10; x++)            {                if(x==3||x==8)                    ...
大家都好聪明,我没能写出来
static void Main(string[] args)
{
int y = 5;
while (y!=0)//请输入
{
Console.Write(y+&quot; &quot;);
y--;//请输入
}
}
}
switch (job)
{
case &quot;局长&quot;: Console.Write(&quot;发双黄月饼&quot;); break;
case &quot;处长&quot;: Console.Write(&quot;发蛋黄月饼&quot;); break;
case &quot;科长&quot;: Console.Write(&quot;发枣泥月饼&quot;); break;
default: Console.Write(&quot;发五仁月饼&quot;); break;
}
这教学当时真是醉了,给三岁小孩上课一样。
using System;
using System.Collections.Generic;
using System.Text;

namespace Test
{
class Program
{
static void Main(string[] args)
{
string nima;//声明变量保存爱好
nima=&quot;你妈&quot;;//给爱好变量赋值
Console.WriteLine(&quot;我爱好&quot;+nima);//打印变量
}
}
}
namespace Test
{
class Program
{
static void Main(string[] args)
{
const string XB = &quot;女人&quot;;//常量,性别
const string Mingzi = &quot;璐璐&quot;;//常量,姓名
Console.WriteLine(Mingzi+&quot;是个&quot;+XB+&quot;的典范&quot;);//使用常量
}
}
}
收获挺大的
输入不能少于5个字符
输出的英文状态下的“:”错了,题目是输出中文状态下的&quot;:&quot;
课程须知
本课程是C#基础课程,热烈欢迎各位小伙伴拍砖吐槽!!
老师告诉你能学到什么?
1、C#的基本概念 2、Visual Studio的使用技巧 3、C#的语法和程序逻辑

微信扫码,参与3人拼团

微信客服

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

帮助反馈 APP下载

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

公众号

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

友情提示:

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

本次提问将花费2个积分

你的积分不足,无法发表

为什么扣积分?

本次提问将花费2个积分

继续发表请点击 "确定"

为什么扣积分?

举报

0/150
提交
取消