Tuesday
October 21, 2014

Homework Help: visual basic

Posted by vsu1 on Thursday, October 8, 2009 at 10:10pm.

Im trying to get this program to average three number having a problem the sample nmubers im using are 6 6 2 average supposed to be 4.6667 but im just geting .6667 I think it has something to do with my s=value(i) not sure what i need to do now can anybody help?

Dim no As Integer = 3
Dim value() As Integer
ReDim value(0 To no - 1)
Dim s As Integer = 0
For i As Integer = 0 To no - 1
Console.WriteLine(" Input your value:")
value(i) = Console.ReadLine()
s = value(i)
Next
Dim a As Double = s / no
Console.WriteLine(" value is " & a)

Answer this Question

First Name:
School Subject:
Answer:

Related Questions

Programming - I need your help to write a program using visual basic 2010 for ...
Programming - Here is the question that I need help to write the code for the ...
programming - I am supposed to modify this program so it begins by asking the ...
Word Problem - A UPS employee, Davis, packs and labels three types of packages: ...
visual basic - in visual basic, notes in a program which explain what the ...
Programming (Visual Basic) - Im seem to be having trouble with this Exercise. ...
visual basic 2010 - I am totally lost with arrays. I have a program that needs ...
programming - 2-5 Grade Determination is says " Write a program that will input ...
visual basic programming - Write a Visual Basic program that will calculate the...
statics - Suppose we want to estimate the average number of purchases in a given...

Search
Members