Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and beginning April 20th, 2021 (Eastern Time) the Yahoo Answers website will be in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.

Lv 2588 points

artsihipchick

Favorite Answers9%
Answers151
  • May I get some help with VB 2008 Coding?

    Can someone tell me what I'm doing wrong in my code? I have to get the sum and the average, and the highest and lowest value of a list of 100 numbers in a text file. My program runs without error, and I get the sum and the average, but I am only getting 0's for my highest and lowest values in the file. The list of numbers in the file ranges from 6.895 to 999.475. I am outputting to a listbox, if that helps. Here is my code:

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

    ' This procedure reads from a file

    ' and gives the Sum, average, highest, and lowest of the numbers

    ' Read a record from the file.

    Dim textNumbers As StreamReader = New StreamReader("NumberSet.txt")

    Me.lstNumbers.Items.Clear()

    ' Declare variables

    Dim intNumber(100) As Integer ' ?

    Dim decNumbers As Decimal

    Dim decSum As Decimal ' To hold the Sum of the numbers in the file

    Dim decAvg As Decimal ' To hold the average of the numbers in the file

    Dim decMax As Decimal ' To hold the largest of the numbers in the file

    Dim decMin As Decimal ' To hold the smallest of the numbers in the file

    Dim intCount As Integer ' Loop Counter

    ' Get Sum of all numbers in the file

    For intCount = 1 To (intNumber.Length - 1)

    decNumbers = CDec(textNumbers.ReadLine())

    decSum += decNumbers

    lstNumbers.Text = decSum

    ' Get value of highest number

    If decNumbers > (1000) Then

    lstNumbers.Text = decMax

    End If

    ' Get value of lowest number

    If decNumbers < (7) Then

    lstNumbers.Text = decMin

    End If

    Next intCount

    ' Get average of Sum of numbers

    decAvg = decSum / 100

    ' Display the data in the list box.

    lstNumbers.Items.Add("Sum: " & decSum)

    lstNumbers.Items.Add("Average : " & decAvg)

    lstNumbers.Items.Add("Highest : " & decMax)

    lstNumbers.Items.Add("Lowest: " & decMin)

    ' Close the file.

    textNumbers.Close()

    End Sub

    I've been working on this for hours, so I will really appreciate your help. Thank you. : )

    1 AnswerProgramming & Design1 decade ago
  • astronomy shareware from 1980's?

    I used to have a shareware program on my computer that allowed me to look at how the solar system and planet alignments looked at ANY given date. I can't remember the name of it. I believe it was from the mid 80's. Can anyone help me?

    2 AnswersAstronomy & Space1 decade ago
  • I am looking for recommendations from seasoned tattoo artists on tattoo machines for both lining and shading?

    I am an apprentice and will be purchasing two new machines within the next 2 months. My Master has given me his recommendations but I would like to hear your opinions and reviews. Thank you.

    1 AnswerTattoos1 decade ago
  • Opinions vs Advice?

    Why is it that when one asks for opinions from people with knowledge on a subject that they get so many answers offering unsolicited advice? Is it so difficult to understand the difference between opinion and advice? If I want advice, I'll ask for advice. Thanks for listening to my rant, and by all means, opinions are welcome.

    5 AnswersOther - Society & Culture1 decade ago
  • Antidepressants vs Marijuana...what's your opinion?

    I have seen this question before, and read the answers, which are mixed. For the record, I believe people who have not used either should not voice their opinion here. I have tried several different antidepressants and never felt any positive affects from them, though I have experienced many of the negative side affects. On the other hand, I've been smoking pot for 40 years and I always feel more relaxed when I am "high", but I'm not stupid, or psychotic, or anything other than mellowed to a comfortable level. I have no chronic side affects, and it definately helps my appetite when I am feeling down or anxious. As far as alcohol goes, it takes away my inhibitions and I tend to speak more freely, and my emotions can change in an instant when I'm drinking. Of course alcohol is a depressant, and marijuana has never affected me that way. My father was allowed to grow it and used it medicinally for years to ease the symptoms of MS.

    Legalize Marijuana!!!

    19 AnswersMental Health1 decade ago