Jump to content

Class program confusion

- - - - -

  • Please log in to reply
4 replies to this topic

#1
agd202

agd202

    Newbie

  • Members
  • Pip
  • 2 posts
I'm new to VB.net and teacher is of no help.

I have a project to complete that takes a set of numbers and displays min, max, avg, sum, range. I have searched for a while and have not found anything that I'm looking for.

Can anybody help me out or point me in the right direction to do this using an array? I'm not exactly familiar with arrays and how to use them.

Thanks

#2
gregwarner

gregwarner

    Programming God

  • Members
  • PipPipPipPipPipPipPip
  • 856 posts
  • Location:Arkansas
Google is your friend.

https://www.google.c...iw=1421&bih=809
Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law.

– Douglas Hofstadter, Gödel, Escher, Bach: An Eternal Golden Braid


#3
agd202

agd202

    Newbie

  • Members
  • Pip
  • 2 posts
I thought Google was my friend too. I have looked and couldn't find the tutorial I was looking for. Thanks for the wonderful advise though.

I was searching for an article, tutorial, or advise on how to create an array that can hold a list of numbers and grows as you put numbers in it. The ones I have found are either defined in the code and not able to change or 2-dimensional which I do not think is what I need to be using.

Edited by agd202, 01 December 2011 - 03:00 PM.
Grammar


#4
gregwarner

gregwarner

    Programming God

  • Members
  • PipPipPipPipPipPipPip
  • 856 posts
  • Location:Arkansas
What you're wanting to know is how to implement dynamically expanding arrays.

You can try the section on dynamic arrays in this tutorial:
Visual Basic Arrays Tutorial

I haven't searched a whole lot on this, as I am unfamiliar with VB.net. But hopefully knowing the correct terminology will help you find what you're looking for.
Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law.

– Douglas Hofstadter, Gödel, Escher, Bach: An Eternal Golden Braid


#5
lespauled

lespauled

    Programming Professional

  • Members
  • PipPipPipPipPip
  • 232 posts
  • Programming Language:C, C++, C#, JavaScript, PL/SQL, Delphi/Object Pascal, Visual Basic .NET, Pascal, Transact-SQL, Bash
If the number of items is dynamic, I would recommend using a List<int> and adding new input numbers to it. You can always revert it back to an array if necessary




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users