February 24, 2017

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)
Dim a As Double = s / no
Console.WriteLine(" value is " & a)

Answer This Question

First Name:
School Subject:

Related Questions

More Related Questions