| |

VerySource

 Forgot password?
 Register
Search
View: 720|Reply: 3

Array problem, please help masters

[Copy link]

1

Threads

2

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

Post time: 2020-1-18 08:00:01
| Show all posts |Read mode
Randomly generate 10 states within 100, and program to find the maximum, minimum, and average values. A reasonable program interface is required.
Reply

Use magic Report

0

Threads

119

Posts

67.00

Credits

Newbie

Rank: 1

Credits
67.00

 China

Post time: 2020-1-23 16:18:01
| Show all posts
Come ask this kind of question too, my feeling is that Lou mainly studies well in school! Don't be foolish in your studies!
Reply

Use magic Report

0

Threads

10

Posts

4.00

Credits

Newbie

Rank: 1

Credits
4.00

 China

Post time: 2020-1-25 20:27:02
| Show all posts
Now that I ’ve asked, I ’ll tell you, I ’m also from that stage where I ca n’t, but I wo n’t remember that I can go online

Public Class Form1

    Private Sub Button1_Click (ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim oRandom As New Random
        Dim iNum As Integer = 0
        Dim maxOfArray As Integer = 0
        Dim minOfArray As Integer = 0
        Dim aveOfArray As Double = 0
        Dim sumOfArray As Integer = 0
        Dim array As New List (Of String)
        Dim i As Integer = 0
        For i = 0 To 10
            iNum = oRandom.Next (100)
            sumOfArray = sumOfArray + iNum
            array.Add (iNum.ToString)
            Label1.Text = Label1.Text + iNum.ToString () + "," 'Display the 10 numbers generated immediately
        Next
        aveOfArray = sumOfArray / 10
        array.Sort ()
        Label2.Text = "Maximum" + array (9) .ToString () + "Minimum" + array (0) .ToString () + "Average" + aveOfArray.ToString ()
    End Sub
End Class
Reply

Use magic Report

1

Threads

2

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

 Author| Post time: 2020-1-29 10:54:01
| Show all posts
Haha, thank you very much
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list