Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8666201
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T17:40:10+00:00 2026-06-12T17:40:10+00:00

The issue is with the bottom of my code where I have to get

  • 0

The issue is with the bottom of my code where I have to get the program to recite the entered values in reverse order. I think it might be something to do with the index?

Option Explicit On
Option Strict On

‘Author: Murray Spears
‘Date: October 12th 2012

‘Write a program that accepts five input values and stores them into an array.
‘Then display numbers in reverse order.
‘Then display the average number, and all numbers that are are above average.

Imports System

Module Values

Sub Main()
    Dim Number(4) as Integer
    Dim Average as Double = 0
    Dim Index as integer
'   
  For Index = 0 to 4
  Console.Write("Enter number: ")
  Number(Index)=Convert.ToInt32(Console.Readline())
  Next Index

'Figure out the average for all the entered values.
Average = (Number(0)+Number(1)+Number(2)+Number(3)+Number(4))/5
Console.Writeline("The average of the numbers is: " &Average)

Console.Write("Numbers that are greater than the average: ")
Index = 4
Do until Index = 0
If Number(Index) > Average then 
Console.Writeline(Number(Index))
End If
Index -=1
Loop


Console.Writeline("Numbers in reverse order: ")
Index = 4
Do while Number(index) > 0
Console.Writeline(Number(Index))
Number(index) -= 1
Loop

End Sub

End Module

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T17:40:11+00:00Added an answer on June 12, 2026 at 5:40 pm

    Use Step -1 to step backwards.

    For Index = 4 To 0 Step -1
        ' do your thing
    Next
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an issue I cant get to the bottom of, so any help
Gists of controller code at bottom of page I have a simple rails nesting
I have created a simplified version of my code that experiences the same issue.
I have something like the following code: <div style=border:2px black solid;overflow:hidden;> <span style=float:right;> <img
I have been wrestling with a IE7 z-index issue today and I can't see
I have an issue in <ul class='nav'> <li> <a class='' href='index.html'> Home </a> </li>
I have questions about the NSString pointer. I wanted to get to the bottom
Before I get to my issue, I have searched around for an answer but
When I try to bottom-align text in a DIV element, I face the issue
I'm having a weird footer issue. http://jsfiddle.net/YGAvd/ The clouds at the bottom of the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.