38.6k views
3 votes
EXERCISE 3

A student's examination scores at the end of the session
have been listed as follows: 67, 89, 56, 34, 60, 95, 43, 55,
51, 42, 77, 44, 89, 67, 81, 70, 49, 45, 54, and 62. Write a
BASIC program to read, find the sum, and calculate the
average score for the student​

1 Answer

3 votes

Answer:

The BASIC program is as follows:

SUM = 0

FOR I = 1 TO 20

INPUT SCORES

SUM = SUM + SCORES

NEXT I

AVERAGE = SUM/20

PRINT AVERAGE

Step-by-step explanation:

This initializes sum to 0

SUM = 0

This iterates through 20

FOR I = 1 TO 20

This reads each score

INPUT SCORES

This calculates the total scores

SUM = SUM + SCORES

NEXT I

This calculates the average

AVERAGE = SUM/20

This prints the calculated average

PRINT AVERAGE

User Walsh
by
8.0k points

No related questions found

Welcome to QAmmunity.org, where you can ask questions and receive answers from other members of our community.