C#示例问题 [英] C# Example Problems

查看:130
本文介绍了C#示例问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

< style type =" text / css"> p.p1 {margin:0.0px 0.0px 0.0px 0.0px;字体:12.0px'Times New Roman'; min-height:15.0px} p.p2 {margin:0.0px 0.0px 0.0px 0.0px;字体:11.0px'Times New Roman'} p.p3 {margin:0.0px 0.0px 0.0px 0.0px;字体:11.0px
'Times New Roman'; min-height:12.0px} p.p4 {margin:0.0px 0.0px 0.0px 0.0px;字体:11.5px'Times New Roman'} span.s1 {font:11.5px'Times New Roman'}< / style>

<style type="text/css">p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px 'Times New Roman'; min-height: 15.0px} p.p2 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px 'Times New Roman'} p.p3 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px 'Times New Roman'; min-height: 12.0px} p.p4 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.5px 'Times New Roman'} span.s1 {font: 11.5px 'Times New Roman'} </style>

1。 创建一个应用程序,根据值是否大于5,在字符串数组中添加数字。如果值大于5,则为true,否则为true。单击按钮时,在消息框中显示true和false。 

1. Create an application that adds numbers in a string array based on if the value is greater than 5. If it is greater than 5 it is true if not it is false. Display the true and false in a message box when the button is clicked. 

2。数组包含整数。声明一个名为
neighborhood 的三元素数组。编写一个代码,确定存储在变量
x 中的特定值是否在数组 values 中。如果是,那么紧接在找到的元素之前的元素,找到的元素以及在
values 数组中跟随它的元素将被添加到数组 neighborhood 。如果未找到所寻找的值,则数组
邻域的所有元素将设置为-1。如果找到的元素是第一个,那么
邻域数组的第一个元素将被设置为0.如果找到的元素是最后一个元素,那么$的最后一个元素b $ b 邻域数组将设置为0.示例:values包含{1,4,6,7,32,3,2,45}; X = 32;邻居应该包含{7,32,3}。 

2. Array values contains integer numbers. Declare a three-element array called neighbourhood. Write a code that determines if a particular value stored in variable x is in the array values. If it is, then the elements immediately preceding the found element, the found element, and the element following it in the values array will be added to the array neighbourhood. If the sought value is not found, then all elements of the array neighbourhood will be set to -1. If the found element is the first one, then the first element of the neighbourhood array will be set to 0. If the found element is the last one, then the last element of the neighbourhood array will be set to 0. Example: values contains {1,4,6,7,32,3,2,45}; x=32; then neighborhood should contain {7,32,3}. 

我不能好像有人帮我了?

推荐答案




1。 根据值是否大于5,创建一个在字符串数组中添加数字的应用程序。

1. Create an application that adds numbers in a string array based on if the value is greater than 5. ...

2。数组包含整数。声明一个名为
neighborhood 的三元素数组。编写一个代码,确定存储在变量
x 中的特定值是否在数组 values 中。 ...

2. Array values contains integer numbers. Declare a three-element array called neighbourhood. Write a code that determines if a particular value stored in variable x is in the array values. ...

我似乎无法得到正确的代码,有人可以帮助我吗?

我确定很多人们会帮忙,但很少有人会为你做所有的b $ b编码。你必须付出努力,然后显示你的代码你用你的代码获得了多少钱。准确而简洁地解释你被困的地方。




您不明白作业的哪一部分?



哪一部分你明白但是不能用C#表达作业吗?
b
b $ b b请注意,两个单独的任务通常应该分成两个独立的线程。



- Wayne

I'm sure a lot of people will help, but few if any will do all of the
coding for you. You have to make an effort, and show how far you have
gotten with your code. Explain exactly and concisely where you are stuck.

Which part of the assignment don't you understand?

Which part of the assignment do you understand but can't express in C#?

Note that two separate tasks usually should be posted in two separate threads.

- Wayne


这篇关于C#示例问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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