帮助完成基本的编程任务 [英] Help with basic programming tasks

查看:130
本文介绍了帮助完成基本的编程任务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

的嗨!我是编程新手,我不太了解。我得到了一些学校作业,我真的需要帮助!如果一个灵魂可以帮助我,那将是可爱的。



任务1:

向用户询问输入(int)并使用if ...其他声明,你会打印不同的消息

取决于用户输入。

输入偶数(2,4,6,8 ...)应该它写的是它是一个偶数。

输入是否是一个奇怪的谈话(1,3,5,7 ...)如果写这是一个奇数。

(提示:使用模数)





任务2:

使用预先循环打印0-9

此外,在预运行完成后,在同一项目中创建一个While循环再次打印0-9

另外,打印哪个你正在使用的循环。



任务3:

创建一个程序,接收用户的文本输入。

然后用户写入应该打印5次,在文本之后它应该是循环是什么循环

on。

例如。用户编写Hello并且程序将其打印出来5次



任务4:

创建一个应用程序,其中Main应该看起来像这样:



Hi! I am really new to programming and I don't understand a lot. I got some school homework and I really need help with it! Would be lovely if one kind soul could help me.

Task 1:
Ask the user for input (int) and using an if ... else statement, you will print different messages
depending on user input.
Is input an even number (2,4,6,8 ...) should it write "It is an even number".
Is the input an odd talk (1,3,5,7 ...) should it write "It is an odd number".
(tips: use modulus)


Task 2:
Use a pre-loop to print 0-9
Also, create a While loop in the same project to print 0-9 once more after the pre-run is complete
Also, print which loop you are using.

Task 3:
Create a program that receives text input from the user.
The user writes should then be printed 5 times and after the text it should be what cycle the loop is
on.
For example. The user writes "Hello" and the program prints it out 5 times

Task 4:
Create an application where "Main" should look like this:

public static void main ()
{

SayHello ();
SayGoodBye ();

}



SayHello和SayGoodBye是你必须定义的方法/功能,应该从你的Main调用。



正如我所说,如果我能得到一些帮助会很可爱!



我应该使用Visual Studio和Console App (.NET Framework)



我尝试过:



Not很多,因为我什么都不懂):


SayHello and SayGoodBye are methods / features that you must define and which should be called from you Main.

As I said, would be lovely if I could get some help!

I am supposed to use Visual Studio with Console App (.NET Framework)

What I have tried:

Not much since I do not understand anything ):

推荐答案

我们不做你的功课:这是有原因的。它就是为了让你思考你被告知的事情,并试着理解它。它也在那里,以便您的导师可以识别您身体虚弱的区域,并将更多的注意力集中在补救措施上。



亲自尝试,你可能会发现它不是和你想象的一样困难!



这个任务是在一系列简单的阶段为你着手的,当你刚刚参加了讲座时 - 应该是非常简单的东西。首先创建一个C#Console应用程序,然后编辑 Main 方法。查看控制台类(系统) [ ^ ]您将在 ReadLine方法 [ ^ 这将帮助您入门。



如果您遇到特定问题,请询问相关问题,我们会尽力提供帮助。但是我们不打算为你做这一切!
We do not do your homework: it is set for a reason. It is there so that you think about what you have been told, and try to understand it. It is also there so that your tutor can identify areas where you are weak, and focus more attention on remedial action.

Try it yourself, you may find it is not as difficult as you think!

The task is set out for you in a set of easy stages, which - when combined with the lecture(s) you just had - should be pretty easy stuff. Start by creating a C# Console App, and edit the Main method. Look at the Console Class (System)[^] and you will find basic examples under the ReadLine Method[^] which will get you started.

If you meet a specific problem, then please ask about that and we will do our best to help. But we aren't going to do it all for you!


引用:

自从我不多什么都不懂

然后是时候学习了。

比如说,任务1。你应该能够

Then it's time to study.
Take, for instance, Task1. You should be able to

  1. 从用户那里得到一个整数
  2. 检查它是奇数还是偶数(有提示'使用模数')
  3. 向用户报告结果





只需使用Google,您就可以获得上述每个步骤的帮助:

C#从控制台读取一个int [ ^ ]

检查号码是否正确很奇怪c# [ ^ ]

写入控制台C# [ ^ ]



Just using Google you can get help on each of the above steps:
C# read an int from console[^]
check if number is odd c#[^]
write to console C#[^]


引用:

不多,因为我什么都不懂

Not much since I do not understand anything



这些任务是最基本的编程任务之一。

认真开始学习,检查课程,找教程或与老师谈谈。



我们不做你的HomeWork。

HomeWork不会测试你乞求别人做你的工作的技能,它会让你思考和帮助您的老师会检查您对所学课程的理解以及您应用这些课程时遇到的问题。

你的任何失败都会帮助你的老师发现你的弱点并设定补救措施。

你的任何失败都会帮助你了解什么有效,什么无效,被称为'试错'学习。

所以,试一试,重读课程并开始工作。如果您遇到特定问题,请展示您的代码并解释这个问题,我们可能会提供帮助。


Those tasks are among the most basic programming tasks possible.
Start study seriously, check your lessons, find a tutorial or have a talk with your teacher.

We do not do your HomeWork.
HomeWork is not set to test your skills at begging other people to do your work, it is set to make you think and to help your teacher to check your understanding of the courses you have taken and also the problems you have at applying them.
Any failure of you will help your teacher spot your weaknesses and set remedial actions.
Any failure of you will help you to learn what works and what don't, it is called 'trial and error' learning.
So, give it a try, reread your lessons and start working. If you are stuck on a specific problem, show your code and explain this exact problem, we might help.


这篇关于帮助完成基本的编程任务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆