Please assist: Array application - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Please assist: Array application

abeljdavilaabeljdavila Posts: 3Member
Write a VB application that reads the data in an array.

It will prompt the user for the beginning and end points of a range.

It will then count how many elements were inside and outside the range. It will display the two counts to the user. To make this a little less tedious to test, put this line before the first function and you won't have to type in the data. Don't change the elements in the array, I might test your code by running it.

Private data() As Integer = {19, 22, 34, 10, 78, 2, 25, 50, 42, 21, 21, 19, 10, 4, 100}


Comments

  • BaldusariusBaldusarius Posts: 162Member
    [code]Private data() As Integer = {19, 22, 34, 10, 78, 2, 25, 50, 42, 21, 21, 19, 10, 4, 100}

    Dim beginRange() as Integer = GetUserInput("Please enter range")

    For Each i as Integer in data
    FirgureOutIfNumberIsInRange(i)
    Next

    If (YouAreStillPayingAttention) Then
    DoYourOwnHomeWork()
    Else
    PrintThisOutAndTurnItIn(canYouSaySummerSchool)
    End If[/code]

    : Write a VB application that reads the data in an array.
    :
    : It will prompt the user for the beginning and end points of a range.
    :
    : It will then count how many elements were inside and outside the range. It will display the two counts to the user. To make this a little less tedious to test, put this line before the first function and you won't have to type in the data. Don't change the elements in the array, I might test your code by running it.
    :
    : Private data() As Integer = {19, 22, 34, 10, 78, 2, 25, 50, 42, 21, 21, 19, 10, 4, 100}
    :
    :
    :

Sign In or Register to comment.