Programming

Here is the question that I need help to write the code for the following program in Visual Basic 2010. I am trying to write the code but it has a run time error. If your could helps me to write the code it would be greatly appreciated.
Q. Write a program that calculates the average of up to 50 numbers input by the user and stored in an array. The program should use a class named Statistics and have an AddNumber method that stores numbers into an array one at a time. The class should have a Count property that keeps track of the number of numbers stored and a method called Average that returns the average of the numbers.
Thank you for your help

  1. 👍 0
  2. 👎 0
  3. 👁 75
  1. If you have a run-time error, one of the following is the culprit:
    1. There is a logic error in the code.
    2. There is an exception which is not caught (a different kind of logic error).
    3. Undetected syntax error.

    The best way to find the problem is to post your code and we'll help you find the problem. Also, posting the error message would help. (array out of bound? Division by zero?...)

    1. 👍 0
    2. 👎 0

Respond to this Question

First Name

Your Response

Similar Questions

  1. c programming

    a student designed a program to accept the age of an employee and then compute the employees retirement year and display the same in a statement on the screen required. a) write out the pseudo-code for the program above b) write

    asked by riley on October 14, 2014
  2. PROGRAMMING

    PLS, I NEED TO BE GUIDED ON HOW TO WRITE A SIMPLE PROGRAM IN BASIC THAT WOULD PROMPT 3 LEVELS OF AUTHENTICATION WHEN UNAUTHORISED LOG-ON IS EFFECTED. You are not going to be able here to get detailed help on the program code, as

    asked by UZOWULU CHARLES on April 23, 2007
  3. computer science

    c++ program question write a program that uses a loop to display the characters for each ascii code 32 through 127. display 16 characters on each line with one space between characters in c++

    asked by mark on April 21, 2010
  4. computer science

    Write a java program that reads from the user the course code, section and the scores of a student for three exams representing two midterms and a final. The percentage of each of the three exams is of fixed value 30, 30 and 40

    asked by rayn on March 13, 2016
  5. Programming Java

    I am learning Java in programming right now. I need to write a program that should have an output like this: The program says "Type ten names". Then ten names sould be typed a person. Then the program chooses a random name from

    asked by Valerie on November 16, 2017
  6. Math (Programming)

    You will need to create a program that will help solve any One-to-One cipher. That is a cipher that replaces each letter in the alphabet with another letter. It is not the same as a Caesar Cipher in that there is no shift. Each

    asked by Anonymous on April 2, 2019
  7. programming

    Design a program and write program that will read a file of sales records and produce a sales report. Each record in the file contains a customer's number and name, a sales amount and a tax code. The tax code is to be applied to

    asked by nanda on November 24, 2015
  8. science

    Write a java program using classes and object to read the em[loyee code (Integer), Imployee name (string), Basic salary )double), Category (Character)then calculate the bonus(double)and the total salary(double)eligible for each

    asked by Hala on January 1, 2017
  9. programming

    can anybody help me out with this code: write a program that converts 10, 50, and 100 kilograms to pounds.

    asked by steve on February 4, 2010
  10. c++ programming

    Solve the following problem. Apply all the steps i.e decomposition, Flowcharting and Pseudo code. Also write C++ program. Design and Write an interactive program that computes the salary in Rupees of a part-time employee based on:

    asked by hafsa on March 20, 2012

More Similar Questions