Alert icon
We're changing our privacy policy. This stuff matters.  Learn more  Dismiss

How To Calculate The Mean/Average In Visual Basic 2008

Loading...

Sign in or sign up now!
9,671
Loading...
Alert icon
Sign in or sign up now!
Alert icon

Uploaded by on Oct 23, 2009

Visual Basic 2008 - Calculate The Mean. Just a simple tutorial on how to work out the average using maths in VB. Yes, I GOT WINDOWS 7!! Its really good, way better than shitty Vista!
Codes:

Dim Count As Integer = 0
Dim total As Integer = 0

Add Number:
total += CInt(TextBox1.Text)
Count += 1
Label1.Text = total & " / " & Count
TextBox1.Clear()

Calculate Average:
TextBox2.Text = total / Count

New:
Label1.Text = "0 / 0"
total = 0 : Count = 0

Link to this comment:

Share to:
see all

All Comments (48)

Sign In or Sign Up now to post a comment!
  • what the hell is up with the stupid music. geez

  • do you know how to find mode?

  • Voted down. maybe you should by a mic and teach us how to do it. this is crap!

  • My fucking ears! WTF IS THIS BOLLOCKS!

  • @chaosblood88 at least he does some rite==

  • Thanks mate...

  • @TheDeadLike Sick by Flyleaf

  • it was helpful thanks

  • its a shame that you did it on a 'windows application' rather than say a console one.... i guess you like to do less coding.

  • @Soniredoncp for the win

Loading...

0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more