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

C#开发轻松入门

难度入门
时长 4小时43分
学习人数
综合评分9.40
833人评价 查看评价
9.5 内容实用
9.5 简洁易懂
9.2 逻辑清晰
活着不好么?

最新回答 / 孟德尔的怪豆
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)             ...

最新回答 / 慕粉4364288
因为x的初始值是1,while条件里面是>2才能执行循环,但是do....while循环是无条件执行一次循环的,所以无条件执行一次do里面的语句,x++后的值是2,所以输出的值是2.
在VS中可以 复制到上面就不行
各位兄弟能不能按照正常思路来,这种入门级的主要看知识点,这种小程序想那么多做什么,自己知道怎么做就行了嘛
这题有bug,那个WriteLine也对的
为什么我的代码和答案一样并且在vs中是可以的 但是在这却不行!! 这样不通过 我的这门课程就因为这一节而无法完成!!!!!!!
int[] num = new int[] { 3, 34, 42, 2, 11, 19, 30, 55, 20 };
for (int i = 0; i &lt; num.Length; i++)
if (num[i] % 2 == 0)
{
Console.Write(num[i] + &quot;,&quot;);
for (i = 0; i &lt; score.Length; i++)
{
if (score[i] &gt; max) //比较元素大小,记录最大元素及其下标
{
max = score[i];
_max = i;
}
}
Console.WriteLine(&quot;分数最高的是{0},分数是{1}&quot;, name[_max], score[_max]);
string[] name=new string[]{&quot;吴松&quot;,&quot;钱东宇&quot;,&quot;伏晨&quot;,&quot;陈陆&quot;,&quot;周蕊&quot;,&quot;林日鹏&quot;,&quot;何昆&quot;,&quot;关欣&quot;};
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;
}
这教学当时真是醉了,给三岁小孩上课一样。
课程须知
本课程是C#基础课程,热烈欢迎各位小伙伴拍砖吐槽!!
老师告诉你能学到什么?
1、C#的基本概念 2、Visual Studio的使用技巧 3、C#的语法和程序逻辑

微信扫码,参与3人拼团

微信客服

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

帮助反馈 APP下载

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

公众号

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

友情提示:

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

本次提问将花费2个积分

你的积分不足,无法发表

为什么扣积分?

本次提问将花费2个积分

继续发表请点击 "确定"

为什么扣积分?

举报

0/150
提交
取消