已回答 几条红色的波浪线

kemp1

新成员
已加入
2020年9月14日
留言内容
2
编程经验
Beginner
看到这么多行是正常的还是我在哪里错了
(第一次)
捕获.png
 

金西尼

C#论坛主持人
工作人员
已加入
2011年4月23日
留言内容
3,501
地点
悉尼,澳大利亚
编程经验
10+
这不是通常的情况,但是如果您在那之前做错了特定的事情,那将是正常的。显然有很多地方是错误的。您可能是从Internet复制并粘贴了一些垃圾,可能没有做过之前期望的某些事情,或者只是继续写作"code" despite the compiler flagging issues with it. Maybe go back to when you had 码 that worked, start making changes to it one by one 和 stop when an error is flagged. We can then address that error 和 probably stop you getting loads 更多 for the same reason.
 

跳伞

工作人员
已加入
2019年4月6日
留言内容
2,500
地点
弗吉尼亚州切萨皮克
编程经验
10+
To me it looks like pseudo 码 that the OP just copied 和 pasted in 和 expected it to just compile 和 run.
 

羊皮

退休程序员
工作人员
已加入
2018年9月5日
留言内容
1,926
地点
英国
编程经验
10+
欢迎来到论坛。

Where did you get the 码 from?

Where did you paste the 码? Ie inside what block of 码?

Maybe it would be better if you show all of your 码 above the 码 you just posted?

Also don't post screenshots of 码. Post your actual 码 on the forums, by adding your 码 in 码 tags.
 

金西尼

C#论坛主持人
工作人员
已加入
2011年4月23日
留言内容
3,501
地点
悉尼,澳大利亚
编程经验
10+
Also don't post screenshots of 码. Post your actual 码 on the forums, by adding your 码 in 码 tags.
我认为屏幕截图在这种情况下是合理的,以便显示所有错误标志。也就是说,在任何合理的福彩12选5走势图屏幕截图情况下,都仍应包括以文本形式发布的福彩12选5走势图,以便我们可以自己复制和粘贴它以进行测试。我还想对福彩12选5走势图中的明显问题进行更正,但是,为了做到这一点,我现在必须从头开始编写全部内容,而不是从那里的内容开始,而只是纠正错误的内容。当陌生人自愿花时间为您提供帮助时,让他们做更多不必要的工作并不是鼓励他们继续这样做的最佳方法。
 

羊皮

退休程序员
工作人员
已加入
2018年9月5日
留言内容
1,926
地点
英国
编程经验
10+
I'd prefer to see the 码file myself than a screenshot of it. If there are reports of squiggles, then we know it's obviously something wrong with 码 structure. I can work that part out for myself without any screenshot. Anyway, I was thinking the same thing, that the 码 is dumped outside of a method, or class or there is some un-closed tag as pointed out above.
 

金西尼

C#论坛主持人
工作人员
已加入
2011年4月23日
留言内容
3,501
地点
悉尼,澳大利亚
编程经验
10+
I suspected that the 码 was in the wrong place at first but the fact that Console.WriteLine is not underlined suggests that that is not the case. I think it's just that there's so much garbage in there. There's enough there to get the gist of what it should be though.
C#:
int hours;
int payRate;
int total;

Console.WriteLine("How many hours do you work?");

hours = Convert.ToInt32(Console.ReadLine());

Console.WriteLine(hours);
Console.WriteLine("What is your rate of pay (per hour)?");

payRate = Convert.ToInt32(Console.ReadLine());
total = payRate * hours;
That's a start. There's a whole lot of other garbage there, including blocks without braces, lines without semicolons, undeclared variables, incorrect logic, etc. There's 更多 work to be done but I think the main problem here is just a fundamental lack of understanding of how to write C# 码. Someone needs to go back 和 learn the basics.
 
最佳 底部