Discussion Locked

VISUAL BASIC ARRAYS HELP!

0 helpful
1 reply
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

does anyone know about arrays and coding? I am taking courses involving VS2005 and I have to do this...
Define an array of integer data type with 1000 elements. place into each element its index number, that is into the first element enter the value 0 and into the second the value 1 and so on.

Sum the values of every 10th element starting with the 50th element all the way to the 650th into dblsum. You will need to define this variable.

calculate the product (multiply) of all the even indexed elements between elements 300 and 500 but only those with an even value in them. To do this you will have to check if the content is divisible by 2.

So lost...
I guess I could start it up as

Dim intarray(999) as integer
intarray(0) = "1"
intarray(1) = "2"
... and so on... but for the other parts anyone have a clue?

1 reply

by deepsand

Try the "Questions" forum; the "Discussion" forum is for matters of general discussion, not specific problems in search of a solution.

Post problems such as this to the "Question" forum, rather than the "Discussion" forum. There are those who specifically seek out problems in need of a solution, and that's where they go to look for such.

Additionally there are the benefits that:

1) The "Questions" forum provides for your feedback, by way of your being able to mark "helpful" responses as such. This does not necessarily mean that a given response contained the complete solution to your problem, but only that it served to guide you toward it. This is intended to serve as an aid to those who may in the future have a problem similar to yours, so that they might have a ready source of reference available, thereby perhaps obviating the need for them to repeat questions previously asked and answered.

2) The revised TR makes it quite difficult to find both "Discussions" and "Questions" that have not had a fairly recent post, owing to some functions comingling them in the listings. By keeping each type in their respective forums, it is easier for all to find what they are looking for.

This discussion is closed to new replies.