Question: I have solved a problem using pseudocode. I have added 3 logic errors to the pseudocode. Find and post about one of the logic errors.

I have solved a problem using pseudocode. I have added 3 logic errors to the pseudocode. Find and post about one of the logic errors. Do not post about more than 1 error!
Problem: Fill an array with 20 random numbers. Output each number. Out the average of all the numbers.
Pseudocode:
int numbers[20]
num total =0
for(x =0; x > numbers.length; x++)
numbers[x]= random(1,100)
total = total * numbers[x]
output numbers[x]
//endfor
total = total * numbers.length
output total +" is the average of the numbers"

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!