:?: I got from the book: Write a piece of visual basic code to process the responses of twenty students who were asked to rate, on a scale from 1 to 10, the quality of the food in the cafeteria. A response of 1 denotes ‘dreadful’ and 10 denotes ‘excellent’. Allow the user input to be entered using a ComboBox. Place the responses in an array and determine the frequency of each rating. Display the frequencies in a histogram in a multiline TextBox. as it shown in the figure below
I started with:
Dim Array As Integer () = New Integer {1,2,3,4,5,6,7,8,9,10}
Dim output As String = “ “
‘ generate random numbers from 1 to 10 to simulate survey results
For Array = 1 To responses.getUpperBound (o)
Responses (Array) = RandomNumber (10)
Next
' response frequency array (indices 0 through 10)
Dim frequency As Integer () = New Integer (10) {}
'count frequencies
For array = 1 To responses.GetUpperBound (0)
Frequency (responses (array) += 1
Next
‘output
ListBox1.Items.Add("Rating" & ControlChars.Tab & "Frequency" & ControlChars.NewLine)
‘clear
ListBox1.Items.Clear()
i dont know how to solve this code i try but ... :confused:
im usin Mircosoft Visual Studio 2005
Help :(