有人可以帮助我吗? ... C# [英] Can someone help me with that ? ... C#

查看:93
本文介绍了有人可以帮助我吗? ... C#的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

编写一个用real int(s)初始化数组的过程,作为参数传递,值为-1



如果我的英语不好我是对不起我在法国这里是那些能说法语的人的真实句子:



Ecrireuneprocédurequiinitialise un tableauderéel,passéenparamètre,avec la valeur -1。



顺便说一句,这是在C#中。



谢谢!!



我尝试了什么:



i没有尝试任何我不喜欢的事情我知道如何做到这一点我唯一知道的是在C#中创建一个简单的数组...

Write a procedure that initialize an array with real int(s), passed as parameter, with the value -1

if my english is bad i'm sorry i'm french here the real sentence for those who are able to speak french :

Ecrire une procédure qui initialise un tableau de réel, passé en paramètre, avec la valeur -1.

By the way this is in C#.

THANK YOU !!

What I have tried:

i didn't try anything i don't know how to do that the only thing i know is to create a simple array in C#...

推荐答案

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



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

想一想:

你知道如何创建一个阵列。

你知道怎么写一个程序(在C#中称为方法,但无论如何)。

您知道如何将参数传递给方法。

您知道如何获得数组的大小。

你知道你要为数组元素赋值。

你知道如何遍历数组的元素。



所以你知道如何做所有这些需要的事情:把它们放在一起,你就可以编写代码......



如果你遇到了一个具体的问题,请询问一下,我们会尽力帮助你。但是我们不打算为你做这一切!
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!
Think about it:
You know how to create an array.
You know how to write a procedure (called a "method" in C#, but no matter).
You know how to pass a parameter to a method.
You know how to get the size of an array.
You know you to assign a value to an array element.
You know how to loop through the elements of an array.

So you know how to do all of the things that this requires: put them together and you have the code written...

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!


一个简单的初始化循环出了什么问题?

What's wrong with a simple initialization loop?
public static void init_double(double[] a)
{
  for (int n=0; n<a.Length; ++n)
    a[n] = -1.0;
}


这篇关于有人可以帮助我吗? ... C#的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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